|
|
|
|
@ -1,4 +1,5 @@
|
|
|
|
|
require "rails_helper" |
|
|
|
|
require_relative "../request_helper" |
|
|
|
|
|
|
|
|
|
RSpec.describe CaseLogsController, type: :request do |
|
|
|
|
let(:owning_organisation) { FactoryBot.create(:organisation) } |
|
|
|
|
@ -19,6 +20,7 @@ RSpec.describe CaseLogsController, type: :request do
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
RequestHelper.stub_http_requests |
|
|
|
|
allow(ENV).to receive(:[]) |
|
|
|
|
allow(ENV).to receive(:[]).with("API_USER").and_return(api_username) |
|
|
|
|
allow(ENV).to receive(:[]).with("API_KEY").and_return(api_password) |
|
|
|
|
@ -136,6 +138,7 @@ RSpec.describe CaseLogsController, type: :request do
|
|
|
|
|
let(:headers) { { "Accept" => "text/html" } } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
RequestHelper.stub_http_requests |
|
|
|
|
sign_in user |
|
|
|
|
get "/logs", headers: headers, params: {} |
|
|
|
|
end |
|
|
|
|
|