-
Notifications
You must be signed in to change notification settings - Fork 34
UsersActivationService.findOlderThan(): add unit tests #337
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@Shagbark Here should be 2 simple unit tests. I'm suggesting you to read a bit about Spock framework to understand what's going on and how it works (maybe this one: http://www.baeldung.com/groovy-spock). Also you can use the following instruction as an example of work flow: https://github.com/php-coder/mystamps/wiki/dev_quick_start_continue |
@php-coder, доброй ночи! |
С текущим кодом и в рамках юнит тестов -- никак. Если в целом смотреть, системно, то это возможно -- есть, например, faketime которая позволяет обмануть программу и подменить текущую дату и время. Если рассуждать в рамках юнит-тестов, то нужно править код -- вынести Но, это все не должно относиться к текущей задаче, так как здесь мы тестируем совсем другой метод и ничего такого сложного нам не понадобится. Просто перехвати дату, которая передается в |
Tech debt for: 0fe253d (#120)
The text was updated successfully, but these errors were encountered: