|
|
@ -4,7 +4,7 @@ import 'package:test/test.dart';
|
|
|
|
|
|
|
|
|
|
|
|
void main() {
|
|
|
|
void main() {
|
|
|
|
group('ShareRepository', () {
|
|
|
|
group('ShareRepository', () {
|
|
|
|
const appUrl = 'https://ashehwkdkdjruejdnensjsjdne.web.app/#/';
|
|
|
|
const appUrl = 'https://fakeurl.com/';
|
|
|
|
late ShareRepository shareRepository;
|
|
|
|
late ShareRepository shareRepository;
|
|
|
|
|
|
|
|
|
|
|
|
setUp(() {
|
|
|
|
setUp(() {
|
|
|
@ -19,7 +19,7 @@ void main() {
|
|
|
|
const shareText = 'hello world!';
|
|
|
|
const shareText = 'hello world!';
|
|
|
|
test('returns the correct share url for twitter', () async {
|
|
|
|
test('returns the correct share url for twitter', () async {
|
|
|
|
const shareScoreUrl =
|
|
|
|
const shareScoreUrl =
|
|
|
|
'https://twitter.com/intent/tweet?url=https%3A%2F%2Fashehwkdkdjruejdnensjsjdne.web.app%2F%23%2F&text=hello%20world!';
|
|
|
|
'https://twitter.com/intent/tweet?url=https%3A%2F%2Ffakeurl.com%2F&text=hello%20world!';
|
|
|
|
final shareScoreResult = shareRepository.shareScore(
|
|
|
|
final shareScoreResult = shareRepository.shareScore(
|
|
|
|
shareText: shareText,
|
|
|
|
shareText: shareText,
|
|
|
|
platform: SharePlatform.twitter,
|
|
|
|
platform: SharePlatform.twitter,
|
|
|
@ -29,7 +29,7 @@ void main() {
|
|
|
|
|
|
|
|
|
|
|
|
test('returns the correct share url for facebook', () async {
|
|
|
|
test('returns the correct share url for facebook', () async {
|
|
|
|
const shareScoreUrl =
|
|
|
|
const shareScoreUrl =
|
|
|
|
'https://www.facebook.com/sharer.php?u=https%3A%2F%2Fashehwkdkdjruejdnensjsjdne.web.app%2F%23%2F"e=hello%20world!';
|
|
|
|
'https://www.facebook.com/sharer.php?u=https%3A%2F%2Ffakeurl.com%2F"e=hello%20world!';
|
|
|
|
final shareScoreResult = shareRepository.shareScore(
|
|
|
|
final shareScoreResult = shareRepository.shareScore(
|
|
|
|
shareText: shareText,
|
|
|
|
shareText: shareText,
|
|
|
|
platform: SharePlatform.facebook,
|
|
|
|
platform: SharePlatform.facebook,
|
|
|
|