rubocop changes
Dieser Commit ist enthalten in:
Ursprung
30fe73570a
Commit
0b8fced879
1 geänderte Dateien mit 9 neuen und 10 gelöschten Zeilen
|
@ -14,8 +14,8 @@ describe CustomWizard::Action do
|
||||||
let(:send_message) { get_wizard_fixture("actions/send_message") }
|
let(:send_message) { get_wizard_fixture("actions/send_message") }
|
||||||
let(:send_message_multi) { get_wizard_fixture("actions/send_message_multi") }
|
let(:send_message_multi) { get_wizard_fixture("actions/send_message_multi") }
|
||||||
let(:api_test_endpoint) { get_wizard_fixture("endpoints/test_endpoint") }
|
let(:api_test_endpoint) { get_wizard_fixture("endpoints/test_endpoint") }
|
||||||
let(:api_test_endpoint_body) { get_wizard_fixture("endpoints/test_endpoint_body")}
|
let(:api_test_endpoint_body) { get_wizard_fixture("endpoints/test_endpoint_body") }
|
||||||
let(:api_test_no_authorization) { get_wizard_fixture("api/no_authorization")}
|
let(:api_test_no_authorization) { get_wizard_fixture("api/no_authorization") }
|
||||||
|
|
||||||
def update_template(template)
|
def update_template(template)
|
||||||
CustomWizard::Template.save(template, skip_jobs: true)
|
CustomWizard::Template.save(template, skip_jobs: true)
|
||||||
|
@ -274,7 +274,7 @@ describe CustomWizard::Action do
|
||||||
with(
|
with(
|
||||||
body: "some_body",
|
body: "some_body",
|
||||||
headers: {
|
headers: {
|
||||||
'Host'=>'myexternalapi.com'
|
'Host' => 'myexternalapi.com'
|
||||||
}).
|
}).
|
||||||
to_return(status: 200, body: "success", headers: {})
|
to_return(status: 200, body: "success", headers: {})
|
||||||
|
|
||||||
|
@ -297,7 +297,7 @@ describe CustomWizard::Action do
|
||||||
with(
|
with(
|
||||||
body: "some_body",
|
body: "some_body",
|
||||||
headers: {
|
headers: {
|
||||||
'Host'=>'myexternalapi.com'
|
'Host' => 'myexternalapi.com'
|
||||||
}).
|
}).
|
||||||
to_return(status: 500, body: "failure", headers: {})
|
to_return(status: 500, body: "failure", headers: {})
|
||||||
|
|
||||||
|
@ -311,9 +311,8 @@ describe CustomWizard::Action do
|
||||||
result = CustomWizard::Api::Endpoint.request("my_api", endpoint_id, "some_body")
|
result = CustomWizard::Api::Endpoint.request("my_api", endpoint_id, "some_body")
|
||||||
log_entry = CustomWizard::Api::LogEntry.list("my_api").first
|
log_entry = CustomWizard::Api::LogEntry.list("my_api").first
|
||||||
|
|
||||||
expect(result).to eq({:error=>"API request failed"})
|
expect(result).to eq({ error: "API request failed" })
|
||||||
expect(log_entry.status).to eq('FAILURE')
|
expect(log_entry.status).to eq('FAILURE')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Laden …
In neuem Issue referenzieren