mirror of
https://github.com/feeddeck/feeddeck.git
synced 2026-03-09 07:02:01 -05:00
This commit adds support to add Lemmy RSS feeds to FeedDeck. A user can provide the url of an Lemmy instance, the url of a community or of an user. The special thing of the Lemmy source in opposite to the normal RSS source is, that we parse the provided link form a feed item, to check if it contains a image, video or YouTube url, to apply some special formatting.
30 lines
820 B
Dart
30 lines
820 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter_test/flutter_test.dart';
|
|
|
|
import 'package:feeddeck/widgets/item/preview/utils/item_title.dart';
|
|
|
|
void main() {
|
|
testWidgets('Should render title', (tester) async {
|
|
await tester.pumpWidget(
|
|
const MaterialApp(
|
|
home: ItemTitle(itemTitle: 'My Title'),
|
|
),
|
|
);
|
|
expect(find.byType(Container), findsOneWidget);
|
|
expect(find.byType(Text), findsOneWidget);
|
|
expect(find.text('My Title'), findsOneWidget);
|
|
});
|
|
|
|
testWidgets('Should render empty container when empty string is provided',
|
|
(tester) async {
|
|
await tester.pumpWidget(
|
|
const MaterialApp(
|
|
home: ItemTitle(itemTitle: ''),
|
|
),
|
|
);
|
|
expect(find.byType(Container), findsOneWidget);
|
|
expect(find.byType(Text), findsNothing);
|
|
});
|
|
}
|