-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Simplify creating associations in specs #3732
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
houndci-bot
reviewed
Sep 26, 2019
javierm
force-pushed
the
voters_in_specs
branch
2 times, most recently
from
September 26, 2019 20:51
4ada00c
to
c7b4099
Compare
javierm
force-pushed
the
array_specs
branch
from
September 26, 2019 21:06
b75f300
to
a74b6da
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 26, 2019 21:12
c7b4099
to
7894af6
Compare
javierm
force-pushed
the
array_specs
branch
from
September 26, 2019 23:22
a74b6da
to
81da7d7
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 26, 2019 23:22
7894af6
to
d5b0354
Compare
houndci-bot
reviewed
Sep 26, 2019
javierm
changed the title
Simplify creating voters and followers in specs
Simplify creating voters, balloters and followers in specs
Sep 26, 2019
javierm
changed the title
Simplify creating voters, balloters and followers in specs
Simplify creating vote, ballots and follows in specs
Sep 26, 2019
javierm
force-pushed
the
voters_in_specs
branch
2 times, most recently
from
September 27, 2019 00:56
bbf2fe7
to
a48bada
Compare
javierm
changed the title
Simplify creating vote, ballots and follows in specs
Simplify creating votes, ballots and follows in specs
Sep 27, 2019
javierm
changed the title
Simplify creating votes, ballots and follows in specs
Simplify creating associations in specs
Sep 27, 2019
javierm
force-pushed
the
voters_in_specs
branch
from
September 27, 2019 18:13
7e60139
to
35fecb3
Compare
javierm
force-pushed
the
array_specs
branch
from
September 27, 2019 18:13
81da7d7
to
144f290
Compare
houndci-bot
reviewed
Sep 27, 2019
javierm
force-pushed
the
array_specs
branch
from
September 27, 2019 20:29
144f290
to
4224d63
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 27, 2019 20:29
35fecb3
to
519b7ca
Compare
javierm
force-pushed
the
array_specs
branch
from
September 27, 2019 20:45
4224d63
to
a46cbf5
Compare
javierm
force-pushed
the
voters_in_specs
branch
2 times, most recently
from
September 27, 2019 23:26
e439845
to
27d0322
Compare
houndci-bot
reviewed
Sep 27, 2019
javierm
force-pushed
the
voters_in_specs
branch
from
September 28, 2019 00:10
27d0322
to
8baa80b
Compare
houndci-bot
reviewed
Sep 28, 2019
houndci-bot
reviewed
Sep 28, 2019
javierm
force-pushed
the
array_specs
branch
from
September 28, 2019 02:41
a46cbf5
to
f7fec4c
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 29, 2019 11:25
9942ae3
to
e0f4825
Compare
javierm
force-pushed
the
array_specs
branch
from
September 29, 2019 13:54
ba73617
to
90195da
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 29, 2019 13:54
e0f4825
to
47368f1
Compare
javierm
force-pushed
the
array_specs
branch
from
September 29, 2019 14:07
90195da
to
0f401a3
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 29, 2019 14:08
47368f1
to
fd85611
Compare
javierm
force-pushed
the
array_specs
branch
3 times, most recently
from
September 29, 2019 21:57
f9255d2
to
c2d7420
Compare
javierm
force-pushed
the
voters_in_specs
branch
from
September 29, 2019 22:36
fd85611
to
d9b412e
Compare
While in theory we wouldn't need to use the `transient` nor the `after(:create)` because there's already a `has_many :through` association with followers, Factory Bot / ActiveRecord don't automatically associate the followable, resulting in an invalid record exception.
javierm
force-pushed
the
voters_in_specs
branch
from
September 30, 2019 11:35
d9b412e
to
71af17d
Compare
Note we usually cannot make it simple because officer assignments are usually assigned to both a poll and a booth, and on a certain date. However, in the few cases where the booth nor the date don't matter, we can make the code a bit easier to read.
We were only using it in a few places. I've left the current `final: true` statement in a few places where using a trait would break vertical alignment, just in case.
Unless we're using the booth assignment for something else in the test, when creating a voter from booth, specifying the poll and the booth is enough to create a booth assignment.
javierm
force-pushed
the
voters_in_specs
branch
from
September 30, 2019 12:10
71af17d
to
e2b536e
Compare
smarques
pushed a commit
to venetochevogliamo/consul
that referenced
this pull request
Apr 29, 2020
Simplify creating associations in specs
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Objectives