Commit a32daf12 authored by Peter Leitzen's avatar Peter Leitzen

Fix some unrelated rubocop offenses

Revealed via `REVEAL_RUBOCOP_TODO`.
parent a76c0301
......@@ -13,8 +13,8 @@ RSpec.describe Gitlab::Database::BulkUpdate do
i_a, i_b = create_list(:issue, 2)
{
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
}
end
......@@ -51,7 +51,7 @@ RSpec.describe Gitlab::Database::BulkUpdate do
it 'is possible to update all objects in a single query' do
users = create_list(:user, 3)
mapping = users.zip(%w(foo bar baz)).to_h do |u, name|
mapping = users.zip(%w[foo bar baz]).to_h do |u, name|
[u, { username: name, admin: true }]
end
......@@ -61,13 +61,13 @@ RSpec.describe Gitlab::Database::BulkUpdate do
# We have optimistically updated the values
expect(users).to all(be_admin)
expect(users.map(&:username)).to eq(%w(foo bar baz))
expect(users.map(&:username)).to eq(%w[foo bar baz])
users.each(&:reset)
# The values are correct on reset
expect(users).to all(be_admin)
expect(users.map(&:username)).to eq(%w(foo bar baz))
expect(users.map(&:username)).to eq(%w[foo bar baz])
end
it 'is possible to update heterogeneous sets' do
......@@ -79,8 +79,8 @@ RSpec.describe Gitlab::Database::BulkUpdate do
mapping = {
mr_a => { title: 'MR a' },
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
}
expect do
......@@ -99,8 +99,8 @@ RSpec.describe Gitlab::Database::BulkUpdate do
i_a, i_b = create_list(:issue, 2)
mapping = {
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
i_a => { title: 'Issue a' },
i_b => { title: 'Issue b' }
}
described_class.execute(%i[title], mapping)
......
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