Skip to content

Commit

Permalink
Fix specs according to review
Browse files Browse the repository at this point in the history
  • Loading branch information
ZitaNemeckova committed Apr 6, 2018
1 parent aa80005 commit 95e879c
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require_migration

describe RemoveProviderRegionForGoogleProvider do
let(:ems_stub) { migration_stub :ExtManagementSystem }

migration_context :up do
before do
let(:ems_stub) { migration_stub :ExtManagementSystem }

it 'does sets provider_region to nil only to Google provider' do
ems_stub.create!(:type => 'ManageIQ::Providers::Google::CloudManager',
:provider_region => 42)
ems_stub.create!(:type => 'ManageIQ::Providers::Amazon::CloudManager',
Expand All @@ -17,13 +17,8 @@
:provider_region => 42)

migrate
end

it 'sets provider_region to nil for ManageIQ::Providers::Google::CloudManager' do
expect(ems_stub.where(:provider_region => nil).count).to eq 1
end

it 'does not set provider_region to nil for other providers' do
expect(ems_stub.where(:provider_region => 42).count).to eq 4
end
end
Expand Down

0 comments on commit 95e879c

Please sign in to comment.