Skip to content

Commit 5355e40

Browse files
committed
Adding some extra testing
1 parent 5a3e22c commit 5355e40

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/services/cms/models/email_template_spec.rb

+14
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,18 @@
8484
expect(@model.time_diff_words(25.months.ago)).to eq("2 years")
8585
end
8686
end
87+
88+
it "passing nil into completed_programme_activity_group_slugs defaults to array" do
89+
@model = described_class.new(
90+
slug:,
91+
subject:,
92+
email_content: Cms::Mocks::EmailComponents::Text.generate_raw_data(text_content:),
93+
programme_slug: "primary-certificate",
94+
completed_programme_activity_group_slugs: nil,
95+
activity_state: :active,
96+
enrolled: true
97+
)
98+
99+
expect(@model.completed_programme_activity_groups).to eq([])
100+
end
87101
end

0 commit comments

Comments
 (0)