Skip to content

Commit 1347f56

Browse files
committed
UsersActivationServiceImplTest: improve test.
- don't check createdAt field (because method doesn't use it) - add check for getLocale() method - remove extra space No functional changes.
1 parent 8f81320 commit 1347f56

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/groovy/ru/mystamps/web/service/UsersActivationServiceImplTest.groovy

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,14 +143,14 @@ class UsersActivationServiceImplTest extends Specification {
143143

144144
def "add() should pass user's activation request to mail service"() {
145145
when:
146-
service.add(registrationForm, ANY_LOCALE)
146+
service.add(registrationForm, Locale.FRANCE)
147147
then:
148148
1 * mailService.sendActivationKeyToUser({ UsersActivation activation ->
149149
assert activation != null
150150
assert activation.activationKey != null
151151
assert activation.email == registrationForm.email
152-
assert DateUtils.roughlyEqual(activation.createdAt, new Date())
153-
return true;
152+
assert activation.locale == new Locale("fr")
153+
return true;
154154
})
155155
}
156156

0 commit comments

Comments
 (0)