Commit e5b07e73 authored by Thong Kuah's avatar Thong Kuah

Fix be assertion to be eq assertion in spec

parent 47727d35
...@@ -300,7 +300,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do ...@@ -300,7 +300,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do
let(:connection) { ActiveRecord::Base.connection } let(:connection) { ActiveRecord::Base.connection }
it 'returns primary' do it 'returns primary' do
expect(described_class.db_role_for_connection(connection)).to be(:primary) expect(described_class.db_role_for_connection(connection)).to eq(:primary)
end end
end end
...@@ -310,14 +310,14 @@ RSpec.describe Gitlab::Database::LoadBalancing do ...@@ -310,14 +310,14 @@ RSpec.describe Gitlab::Database::LoadBalancing do
context 'when a proxy connection is used' do context 'when a proxy connection is used' do
it 'returns :unknown' do it 'returns :unknown' do
expect(described_class.db_role_for_connection(proxy)).to be(:unknown) expect(described_class.db_role_for_connection(proxy)).to eq(:unknown)
end end
end end
context 'when a read connection is used' do context 'when a read connection is used' do
it 'returns :replica' do it 'returns :replica' do
proxy.load_balancer.read do |connection| proxy.load_balancer.read do |connection|
expect(described_class.db_role_for_connection(connection)).to be(:replica) expect(described_class.db_role_for_connection(connection)).to eq(:replica)
end end
end end
end end
...@@ -325,7 +325,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do ...@@ -325,7 +325,7 @@ RSpec.describe Gitlab::Database::LoadBalancing do
context 'when a read_write connection is used' do context 'when a read_write connection is used' do
it 'returns :primary' do it 'returns :primary' do
proxy.load_balancer.read_write do |connection| proxy.load_balancer.read_write do |connection|
expect(described_class.db_role_for_connection(connection)).to be(:primary) expect(described_class.db_role_for_connection(connection)).to eq(:primary)
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