We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a3e22c commit 5355e40Copy full SHA for 5355e40
spec/services/cms/models/email_template_spec.rb
@@ -84,4 +84,18 @@
84
expect(@model.time_diff_words(25.months.ago)).to eq("2 years")
85
end
86
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
101
0 commit comments