Skip to content

Instantly share code, notes, and snippets.

@mchernyavskaya
Created January 6, 2017 16:26
Show Gist options
  • Save mchernyavskaya/6c7beb2ba1d660679cae2b122fa73acf to your computer and use it in GitHub Desktop.
Save mchernyavskaya/6c7beb2ba1d660679cae2b122fa73acf to your computer and use it in GitHub Desktop.
def 'test get template pages with exception'() {
given:
when:
service.getTemplatePages()
then:
1 * accountService.validateTemplateAccount() >> {
throw new ClientSetupException("Ta da!")
}
0 * pageDao.getUserPages(CLIENT_ID, USER_ID)
0 * userPreferencesDao.getActivePage(CLIENT_ID, USER_ID)
0 * pageDao.create(_)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment