Skip to content

Commit 00a4a7a

Browse files
committed
fixup
1 parent 78b63d9 commit 00a4a7a

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

spec/services/metrics/form_count_service_spec.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
before do
2424
Form.destroy_all
2525

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.
2628
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: [])
3133
create(:form, state: :draft)
3234
end
3335

0 commit comments

Comments
 (0)