Commit 9c4698dc authored by Luke Duncalfe's avatar Luke Duncalfe

Merge branch 'cablett-simplify-tests' into 'master'

Change eq [] to be_empty

See merge request gitlab-org/gitlab!63948
parents 4f2108f4 66aab4cc
...@@ -105,7 +105,7 @@ RSpec.describe Mutations::DesignManagement::Upload do ...@@ -105,7 +105,7 @@ RSpec.describe Mutations::DesignManagement::Upload do
context "with a valid design" do context "with a valid design" do
it "returns the updated designs" do it "returns the updated designs" do
expect(resolve[:errors]).to eq [] expect(resolve[:errors]).to be_empty
expect(resolve[:designs].map(&:filename)).to contain_exactly("dk.png") expect(resolve[:designs].map(&:filename)).to contain_exactly("dk.png")
end end
end end
......
...@@ -9,7 +9,7 @@ RSpec.describe Resolvers::BoardsResolver do ...@@ -9,7 +9,7 @@ RSpec.describe Resolvers::BoardsResolver do
shared_examples_for 'group and project boards resolver' do shared_examples_for 'group and project boards resolver' do
it 'does not create a default board' do it 'does not create a default board' do
expect(resolve_boards).to eq [] expect(resolve_boards).to be_empty
end end
it 'calls Boards::BoardsFinder' do it 'calls Boards::BoardsFinder' do
......
...@@ -108,7 +108,7 @@ RSpec.describe Awardable do ...@@ -108,7 +108,7 @@ RSpec.describe Awardable do
it "doesn't include unused thumbs buttons when disabled in project" do it "doesn't include unused thumbs buttons when disabled in project" do
issue_without_downvote.project.show_default_award_emojis = false issue_without_downvote.project.show_default_award_emojis = false
expect(issue_without_downvote.grouped_awards.keys.sort).to eq [] expect(issue_without_downvote.grouped_awards.keys.sort).to be_empty
end end
it "includes unused thumbs buttons when enabled in project" do it "includes unused thumbs buttons when enabled in project" do
...@@ -118,7 +118,7 @@ RSpec.describe Awardable do ...@@ -118,7 +118,7 @@ RSpec.describe Awardable do
end end
it "doesn't include unused thumbs buttons in summary" do it "doesn't include unused thumbs buttons in summary" do
expect(issue_without_downvote.grouped_awards(with_thumbs: false).keys).to eq [] expect(issue_without_downvote.grouped_awards(with_thumbs: false).keys).to be_empty
end end
it "includes used thumbs buttons when disabled in project" do it "includes used thumbs buttons when disabled in project" do
......
...@@ -750,7 +750,7 @@ RSpec.describe Snippet do ...@@ -750,7 +750,7 @@ RSpec.describe Snippet do
end end
it 'returns an empty array' do it 'returns an empty array' do
expect(subject).to eq [] expect(subject).to be_empty
end end
end end
end end
......
...@@ -48,7 +48,7 @@ RSpec.shared_examples 'resource_label_events API' do |parent_type, eventable_typ ...@@ -48,7 +48,7 @@ RSpec.shared_examples 'resource_label_events API' do |parent_type, eventable_typ
get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events", user) get api("/#{parent_type}/#{parent.id}/#{eventable_type}/#{eventable[id_name]}/resource_label_events", user)
expect(json_response).to be_an Array expect(json_response).to be_an Array
expect(json_response).to eq [] expect(json_response).to be_empty
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