|
23 | 23 | before do |
24 | 24 | Form.destroy_all |
25 | 25 |
|
| 26 | + # Use explicit states instead of :live/:archived traits — those pull in :with_pages, |
| 27 | + # and each page factory creates its own :form, inflating counts. |
26 | 28 | create(:form, :with_group, group:, state: :draft) |
27 | | - create(:form, :live, :with_group, group:) |
28 | | - create(:form, :live_with_draft, :with_group, group:) |
29 | | - create(:form, :archived, :with_group, group:) |
30 | | - create(:form, :archived_with_draft, :with_group, group:) |
| 29 | + create(:form, :with_group, group:, state: :live, pages: []) |
| 30 | + create(:form, :with_group, group:, state: :live_with_draft, pages: []) |
| 31 | + create(:form, :with_group, group:, state: :archived, pages: []) |
| 32 | + create(:form, :with_group, group:, state: :archived_with_draft, pages: []) |
31 | 33 | create(:form, state: :draft) |
32 | 34 | end |
33 | 35 |
|
|
0 commit comments