Skip to content

Instantly share code, notes, and snippets.

@devmsh
Created March 27, 2020 16:21
Show Gist options
  • Save devmsh/d1cc126064517805ce7d18152d19cb95 to your computer and use it in GitHub Desktop.
Save devmsh/d1cc126064517805ce7d18152d19cb95 to your computer and use it in GitHub Desktop.
test
test(
'should get invaled data from login use case on error data',
() async {
mockPost(
url: Constant.api + "login",
response: fixture('login', "failed.json"),
status: 422,
);
var authBloc = sl<AuthBloc>();
expectLater(
authBloc,
emitsInOrder([
Empty(),
Loading(),
Error(message: "please check your mobile or password"),
]));
authBloc.add(LoginByMobileAuthEvent('5900000000', "12345"));
},
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment