Skip to content

Commit a3fcb88

Browse files
committed
test: Improve MessageTemplateTest reliability
1 parent a77aa96 commit a3fcb88

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/models/message_template_test.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class MessageTemplateTest < ActiveSupport::TestCase
1414
end
1515

1616
should "refresh stored instance when calling #load_singleton" do
17+
# Fresh load + instance expiration
18+
MessageTemplate.load_singleton
1719
# Mutate the in-memory instance
1820
MessageTemplate.instance.html = "foo"
1921
assert_equal "foo", MessageTemplate.instance.html
@@ -23,6 +25,8 @@ class MessageTemplateTest < ActiveSupport::TestCase
2325
end
2426

2527
should "refresh singleton after instance has aged" do
28+
# Fresh load + instance expiration
29+
MessageTemplate.load_singleton
2630
# Mutate the in-memory instance
2731
MessageTemplate.instance.html = "foo"
2832
assert_equal "foo", MessageTemplate.instance.html

0 commit comments

Comments
 (0)