Commit eef4de93dea70550c83a05d66ac1b3fb3bcd78ed
1 parent
391258e0
Exists in
colab
and in
4 other branches
Update inverse associations in KalibroConfig. and ReadingGroup factories
Showing
2 changed files
with
10 additions
and
0 deletions
Show diff stats
spec/factories/kalibro_configuration_attributes.rb
| @@ -10,5 +10,10 @@ FactoryGirl.define do | @@ -10,5 +10,10 @@ FactoryGirl.define do | ||
| 10 | trait :private do | 10 | trait :private do |
| 11 | self.public false | 11 | self.public false |
| 12 | end | 12 | end |
| 13 | + | ||
| 14 | + after(:build) do |kalibro_configuration_attributes| | ||
| 15 | + kalibro_configuration_attributes.kalibro_configuration.attributes = kalibro_configuration_attributes | ||
| 16 | + end | ||
| 17 | + | ||
| 13 | end | 18 | end |
| 14 | end | 19 | end |
spec/factories/reading_group_attributes.rb
| @@ -10,5 +10,10 @@ FactoryGirl.define do | @@ -10,5 +10,10 @@ FactoryGirl.define do | ||
| 10 | trait :private do | 10 | trait :private do |
| 11 | self.public false | 11 | self.public false |
| 12 | end | 12 | end |
| 13 | + | ||
| 14 | + | ||
| 15 | + after(:build) do |reading_group_attributes| | ||
| 16 | + reading_group_attributes.reading_group.attributes = reading_group_attributes | ||
| 17 | + end | ||
| 13 | end | 18 | end |
| 14 | end | 19 | end |
-
mentioned in commit 7ce5b240a9bde7e128a824d2ec3c51196eceec14