diff options
| author | Teddy Wing | 2017-11-08 16:43:31 +0100 |
|---|---|---|
| committer | cedricnjanga | 2017-11-13 17:52:54 +0100 |
| commit | 80f932d417744488c7dadc53d7369ca573f1fc61 (patch) | |
| tree | 77b5c20fc5067f303812d94493337294bf88c385 /spec/controllers | |
| parent | 089f3d3268aa73acdb162a5479740bb2d36aff67 (diff) | |
| download | chouette-core-80f932d417744488c7dadc53d7369ca573f1fc61.tar.bz2 | |
ComplianceCheckSetsController: Get ComplianceCheckSet and update status
Get the `ComplianceCheckSet` from the URL and call its `#update_status`
method.
This doesn't currently work all the way. We need to send a real
response.
Refs #4757
Diffstat (limited to 'spec/controllers')
| -rw-r--r-- | spec/controllers/api/v1/compliance_check_sets_controller_spec.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb b/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb index c9c58c7cb..e8e24b530 100644 --- a/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb +++ b/spec/controllers/api/v1/compliance_check_sets_controller_spec.rb @@ -1,7 +1,12 @@ RSpec.describe Api::V1::ComplianceCheckSetsController, type: :controller do + include_context 'iboo authenticated api user' + describe "POST #validate" do - it "calls [that thing that updates statuses on ComplianceCheckX]" do - post :validated, params: { id: 5 } + it "calls #update_status on the ComplianceCheckSet" do + check_set = create(:compliance_check_set) + expect_any_instance_of(ComplianceCheckSet).to receive(:update_status) + + patch :validated, id: check_set.id end end end |
