Commit 8a02e11f authored by Patrick Derichs's avatar Patrick Derichs

Add spec for nil user

parent 9d5ead83
......@@ -42,6 +42,10 @@ describe Note do
it 'returns true for a guest user' do
expect(note.visible_for?(guest)).to be_truthy
end
it 'returns true for a nil user' do
expect(note.visible_for?(nil)).to be_truthy
end
end
context 'when note is older than epic' do
......@@ -62,6 +66,10 @@ describe Note do
it 'returns false for a guest user' do
expect(older_note.visible_for?(guest)).to be_falsy
end
it 'returns false for a nil user' do
expect(older_note.visible_for?(nil)).to be_falsy
end
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment