Commit Graph

24 Commits

Author SHA1 Message Date
Javi Martín
b787e33883 Use the same system to freeze time in all specs
This required changing the `voted_before_sign_in` slightly in order to
change what the method returns if the user signed in and voted at the
exact same microsecond.

It doesn't affect production code because it would be impossible for the
user to do both things at the same time.

As a side effect, the method now returns what the method name suggests.
Before this change, the correct method name would have been
`voted_before_or_at_the_same_time_of_sign_in`.

As a less desirable side effect, in the tests now we need to make sure
at least one second passes between the moment a user votes and the
moment a user signs in again. One microsecond wouldn't work because
the method `travel_to` automatically sets microseconds to zero in order
to avoid rounding issues.
2018-09-19 14:11:50 +02:00
Angel Perez
ff74d66405 Remove unnecessary extra expectation for 'Voting in booth' scenario 2018-03-27 14:47:50 -04:00
rgarcia
8fb9be9d07 Fix RSpec's should deprecation warning
Using `stub` from rspec-mocks' old `:should` syntax without explicitly
enabling the syntax is deprecated. Use the new `:expect` syntax or
explicitly enable `:should` instead
2018-01-22 17:40:56 +01:00
Angel Perez
9a0eca73d7 Fix: Deprecation warnings when running test suite (#2287) 2018-01-09 17:54:46 -04:00
Bertocq
34bb9d65b1 Enable RSpec/NotToNot cop and fix all issues
Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/NotToNot
2018-01-07 17:39:48 +01:00
Bertocq
2d355ce938 Enable RSpec/LetSetup cop & fix issues
Read more about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/LetSetup
2018-01-07 16:23:49 +01:00
María Checa
bb06af3877 Improved results tests 2017-10-20 16:49:25 +02:00
María Checa
8be8bb07f9 Added first poll results tests 2017-10-19 12:17:49 +02:00
BertoCQ
d3fb4e2615 Merge pull request #2066 from consul/poll-voting
Adds spec for user voting in booth and then verifying account
2017-10-17 21:21:12 +02:00
rgarcia
6b7d38c27a adds spec for user voting in poll and then verifying account 2017-10-17 15:00:34 +02:00
BertoCQ
db7c80ef13 Merge pull request #2021 from consul/fixed-already-voted-message
Fixed already voted message in poll show
2017-10-17 14:42:46 +02:00
María Checa
712151b395 Tests improvements 2017-10-17 13:17:20 +02:00
María Checa
e1e9b431d7 Added tests 2017-10-16 20:10:49 +02:00
decabeza
f94a376392 updates text on specs 2017-10-13 14:16:46 +02:00
rgarcia
c097cf236c updates specs 2017-10-13 12:41:43 +02:00
María Checa
84e35edca7 Added new tests for vote token 2017-10-07 16:16:39 +02:00
María Checa
089c1fecfd Added tests 2017-10-06 13:37:24 +02:00
Bertocq
895fc96bee Correct voter feature spec scenario name 2017-10-05 00:39:05 +02:00
Raimond Garcia
1b58b7851b Merge branch 'master' into fix/shift_creation_polls 2017-10-04 20:14:08 +02:00
Bertocq
c62b573489 Fix poll Voter feature spec 2017-10-04 17:59:29 +02:00
rgarcia
007bcb7ec7 fixes specs 2017-10-04 17:46:25 +02:00
María Checa
5b7a90221a Fixed tests 2017-10-04 11:18:09 +02:00
Bertocq
825671ad9b Fix polls answer this question show text 2017-10-03 18:53:44 +02:00
rgarcia
085991c624 allows voting only in one origin: booth or web 2017-10-02 16:22:31 +02:00