Browse Source

lint fixes

pull/528/head
Dushan Despotovic 3 years ago
parent
commit
10507fa5a8
  1. 3
      app/controllers/case_logs_controller.rb
  2. 1
      spec/models/case_log_spec.rb
  3. 4
      spec/services/imports/case_logs_import_service_spec.rb

3
app/controllers/case_logs_controller.rb

@ -104,12 +104,11 @@ private
{
"owning_organisation_id" => current_user.organisation.id,
"managing_organisation_id" => current_user.organisation.id,
"created_by_id" => current_user.id
"created_by_id" => current_user.id,
}
end
def api_case_log_params
return {} unless params[:case_log]
permitted = params.require(:case_log).permit(CaseLog.editable_fields)

1
spec/models/case_log_spec.rb

@ -1852,7 +1852,6 @@ RSpec.describe CaseLog do
end
context "when filtering by user" do
before do
PaperTrail::Version.find_by(item_id: case_log_1.id, event: "create").update!(whodunnit: created_by_user.to_global_id.uri.to_s)
PaperTrail::Version.find_by(item_id: case_log_2.id, event: "create").update!(whodunnit: created_by_user.to_global_id.uri.to_s)

4
spec/services/imports/case_logs_import_service_spec.rb

@ -32,8 +32,8 @@ RSpec.describe Imports::CaseLogsImportService do
WebMock.stub_request(:get, /api.postcodes.io\/postcodes\/LS166FT/)
.to_return(status: 200, body: '{"status":200,"result":{"codes":{"admin_district":"E08000035"}}}', headers: {})
FactoryBot.create(:user, old_user_id: "c3061a2e6ea0b702e6f6210d5c52d2a92612d2aa" )
FactoryBot.create(:user, old_user_id: "e29c492473446dca4d50224f2bb7cf965a261d6f" )
FactoryBot.create(:user, old_user_id: "c3061a2e6ea0b702e6f6210d5c52d2a92612d2aa")
FactoryBot.create(:user, old_user_id: "e29c492473446dca4d50224f2bb7cf965a261d6f")
end
it "successfully create all case logs" do

Loading…
Cancel
Save