diff options
| author | Teddy Wing | 2017-11-09 11:46:42 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-11-13 17:52:54 +0100 |
| commit | 8602bf7a265f32fc84f609eca790c9a76a723be0 (patch) | |
| tree | 11f38cf4badd0d5d63ca479309dd84fd8c3d0d81 /spec/models | |
| parent | 406726c7d9f1d98a36e263c57a1fa361003cface (diff) | |
| download | chouette-core-8602bf7a265f32fc84f609eca790c9a76a723be0.tar.bz2 | |
Revert "ComplianceCheckSet#update_status: Should return a boolean"
This reverts commit b7477e28f90c961079c7b12c4992071cbc11b2d6.
This logic isn't right. We should return true/false based on the result
of `update`, as in, whether the value was able to be updated, instead of
on the contents of the status.
Diffstat (limited to 'spec/models')
| -rw-r--r-- | spec/models/compliance_check_set_spec.rb | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/spec/models/compliance_check_set_spec.rb b/spec/models/compliance_check_set_spec.rb index a77795a86..92b052b53 100644 --- a/spec/models/compliance_check_set_spec.rb +++ b/spec/models/compliance_check_set_spec.rb @@ -63,27 +63,5 @@ RSpec.describe ComplianceCheckSet, type: :model do expect(check_set.status).to eq('warning') end - - it "returns true when setting :status to successful" do - check_set = create(:compliance_check_set) - create( - :compliance_check_resource, - compliance_check_set: check_set, - status: 'OK' - ) - - expect(check_set.update_status).to be true - end - - it "returns false when setting :status to anything except successful" do - check_set = create(:compliance_check_set) - create( - :compliance_check_resource, - compliance_check_set: check_set, - status: 'ERROR' - ) - - expect(check_set.update_status).to be false - end end end |
