Skip to content

Commit

Permalink
Fix counting active record objects in association
Browse files Browse the repository at this point in the history
  • Loading branch information
d-m-u committed Jul 16, 2019
1 parent 0ecc0bf commit 3786b86
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions spec/models/service_template/copy_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
expect(MiqProvisionRequestTemplate.count).to eq(2)
expect(new_service_template.guid).not_to eq(@st1.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(@st1.service_resources.first.resource).not_to be(nil)
end

Expand Down Expand Up @@ -143,7 +143,7 @@
expect(MiqProvisionRequestTemplate.count).to eq(2)
expect(new_service_template.guid).not_to eq(service_template_ansible_tower.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(service_template_ansible_tower.service_resources.first.resource).not_to be(nil)
end

Expand All @@ -159,7 +159,7 @@
expect(MiqProvisionRequestTemplate.count).to eq(2)
expect(new_service_template.guid).not_to eq(service_template_orchestration.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(service_template_orchestration.service_resources.first.resource).not_to be(nil)
end
end
Expand Down Expand Up @@ -198,7 +198,7 @@
expect(ExtManagementSystem.count).to eq(1)
expect(new_service_template.guid).not_to eq(@st1.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(@st1.service_resources.first.resource).not_to be(nil)
end

Expand All @@ -212,7 +212,7 @@
expect(OrchestrationTemplate.count).to eq(1)
expect(new_service_template.guid).not_to eq(@st1.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(@st1.service_resources.first.resource).not_to be(nil)
end

Expand All @@ -228,7 +228,7 @@
expect(MiqProvisionRequestTemplate.count).to eq(2)
expect(new_service_template.guid).not_to eq(@st1.guid)
expect(new_service_template.display).to be(false)
expect(new_service_template.service_resources).not_to be(nil)
expect(new_service_template.service_resources.count).not_to be(0)
expect(@st1.service_resources.first.resource).not_to be(nil)
end
end
Expand Down

0 comments on commit 3786b86

Please sign in to comment.