Skip to content

Commit 27c3d48

Browse files
authored
Increase coverage (#45)
1 parent c307e80 commit 27c3d48

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

spec/extensions/rails_cache_spec.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,20 @@
3131
})
3232
end
3333

34+
it "caches an object with newlines" do
35+
json = render(<<~PROPS)
36+
json.author(cache: 'some_cache_key') do
37+
json.firstName "hi \nworld"
38+
end
39+
PROPS
40+
41+
expect(json).to eql_json({
42+
author: {
43+
firstName: "hi \nworld"
44+
}
45+
})
46+
end
47+
3448
it "caches an object with expiry" do
3549
freeze_time
3650

0 commit comments

Comments
 (0)