Skip to content

Commit

Permalink
Merge 7890103 into ec42ab3
Browse files Browse the repository at this point in the history
  • Loading branch information
mjgiarlo committed Sep 5, 2019
2 parents ec42ab3 + 7890103 commit c73c9f8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
4 changes: 0 additions & 4 deletions .rubocop.yml
Expand Up @@ -40,7 +40,3 @@ RSpec/MultipleExpectations:
RSpec/ExpectActual:
Exclude:
- 'spec/routing/**'

RSpec/DescribeClass:
Exclude:
- 'spec/requests/**'
2 changes: 1 addition & 1 deletion app/controllers/objects_controller.rb
Expand Up @@ -44,7 +44,7 @@ def update
# Update the constituent relationship
errors = ConstituentService.new(parent_druid: params[:id]).add(child_druids: filtered_params[:constituent_ids])

return render json: { errors: errors.to_json }, status: :unprocessable_entity if errors
return render json: { errors: errors }, status: :unprocessable_entity if errors

head :no_content
end
Expand Down
3 changes: 1 addition & 2 deletions spec/requests/virtual_merge_spec.rb
Expand Up @@ -62,8 +62,7 @@
headers: { 'X-Auth' => "Bearer #{jwt}" }
expect(service).to have_received(:add).with(child_druids: [child1_id, child2_id])
expect(response).to be_unprocessable
json = JSON.parse(response.body)
expect(json['errors']).to eq '{"druid:child2":"Item druid:child2 is not open for modification"}'
expect(response.body).to eq '{"errors":{"druid:child2":"Item druid:child2 is not open for modification"}}'
end
end
end

0 comments on commit c73c9f8

Please sign in to comment.