Commit 9b4e45c3 authored by Matija Čupić's avatar Matija Čupić

Check for explicit true or false in specs

parent 44374434
...@@ -2574,7 +2574,7 @@ describe Project do ...@@ -2574,7 +2574,7 @@ describe Project do
end end
it 'returns false' do it 'returns false' do
is_expected.to be_falsey is_expected.to be false
end end
end end
...@@ -2584,7 +2584,7 @@ describe Project do ...@@ -2584,7 +2584,7 @@ describe Project do
end end
it 'returns true' do it 'returns true' do
is_expected.to be_truthy is_expected.to be true
end end
end end
...@@ -2594,7 +2594,7 @@ describe Project do ...@@ -2594,7 +2594,7 @@ describe Project do
end end
it 'returns true' do it 'returns true' do
is_expected.to be_truthy is_expected.to be true
end end
end end
...@@ -2602,7 +2602,7 @@ describe Project do ...@@ -2602,7 +2602,7 @@ describe Project do
let(:ref) { nil } let(:ref) { nil }
it 'returns false' do it 'returns false' do
is_expected.to be_falsey is_expected.to be false
end end
end end
...@@ -2637,6 +2637,14 @@ describe Project do ...@@ -2637,6 +2637,14 @@ describe Project do
it_behaves_like 'ref is protected tag' it_behaves_like 'ref is protected tag'
end end
context 'when ref does not exist' do
let(:ref) { 'something' }
it 'returns false' do
is_expected.to be false
end
end
end end
context 'when ref is full ref' do context 'when ref is full ref' do
...@@ -2667,7 +2675,7 @@ describe Project do ...@@ -2667,7 +2675,7 @@ describe Project do
context 'when ref is not protected' do context 'when ref is not protected' do
it 'returns false' do it 'returns false' do
is_expected.to be_falsey is_expected.to be false
end end
end end
...@@ -2677,10 +2685,18 @@ describe Project do ...@@ -2677,10 +2685,18 @@ describe Project do
end end
it 'returns true' do it 'returns true' do
is_expected.to be_truthy is_expected.to be true
end end
end end
end end
context 'when ref does not exist' do
let(:ref) { 'refs/heads/something' }
it 'returns false' do
is_expected.to be false
end
end
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