Skip to content

Commit 43ed04a

Browse files
committed
add specs to ensure mime type is still set correctly
1 parent 2b4fb3c commit 43ed04a

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

spec/errors_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131

3232
it do
3333
expect(response).to have_http_status(:unprocessable_entity)
34+
expect(response.media_type).to eq("application/vnd.api+json")
3435
expect(response_json['errors'].size).to eq(1)
3536
expect(response_json['errors'][0]['status']).to eq('422')
3637
expect(response_json['errors'][0]['title'])

spec/fetching_spec.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
it do
2626
expect(response).to have_http_status(:ok)
2727
expect(response_json['data'].size).to eq(users.size)
28+
expect(response.media_type).to eq("application/vnd.api+json")
2829

2930
response_json['data'].each do |item|
3031
user = users.detect { |u| u.id == item['id'].to_i }

0 commit comments

Comments
 (0)