about summary refs log tree commit diff
path: root/spec/requests
diff options
context:
space:
mode:
authorClaire <claire.github-309c@sitedethib.com>2021-03-19 14:34:08 +0100
committerGitHub <noreply@github.com>2021-03-19 14:34:08 +0100
commitc7f04961b6dcb1b7e12136deadcf65076c130c40 (patch)
tree20788cbb86d4ae8d38ce539325205e5f0a1ee344 /spec/requests
parentba22398c38067e05f141a0dddeb20bf68913988a (diff)
parent3b7b607300d662aa1f25d459ca12aec89ab550e8 (diff)
Merge pull request #1513 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'spec/requests')
-rw-r--r--spec/requests/catch_all_route_request_spec.rb4
-rw-r--r--spec/requests/host_meta_request_spec.rb2
-rw-r--r--spec/requests/link_headers_spec.rb2
-rw-r--r--spec/requests/webfinger_request_spec.rb6
4 files changed, 7 insertions, 7 deletions
diff --git a/spec/requests/catch_all_route_request_spec.rb b/spec/requests/catch_all_route_request_spec.rb
index 22ce1cf59..f965f5522 100644
--- a/spec/requests/catch_all_route_request_spec.rb
+++ b/spec/requests/catch_all_route_request_spec.rb
@@ -6,7 +6,7 @@ describe "The catch all route" do
       get "/test"
 
       expect(response.status).to eq 404
-      expect(response.content_type).to eq "text/html"
+      expect(response.media_type).to eq "text/html"
     end
   end
 
@@ -15,7 +15,7 @@ describe "The catch all route" do
       get "/test.test"
 
       expect(response.status).to eq 404
-      expect(response.content_type).to eq "text/html"
+      expect(response.media_type).to eq "text/html"
     end
   end
 end
diff --git a/spec/requests/host_meta_request_spec.rb b/spec/requests/host_meta_request_spec.rb
index beb33a859..0ca641461 100644
--- a/spec/requests/host_meta_request_spec.rb
+++ b/spec/requests/host_meta_request_spec.rb
@@ -6,7 +6,7 @@ describe "The host_meta route" do
       get host_meta_url
 
       expect(response).to have_http_status(200)
-      expect(response.content_type).to eq "application/xrd+xml"
+      expect(response.media_type).to eq "application/xrd+xml"
     end
   end
 end
diff --git a/spec/requests/link_headers_spec.rb b/spec/requests/link_headers_spec.rb
index 712ee262b..c32e0f79a 100644
--- a/spec/requests/link_headers_spec.rb
+++ b/spec/requests/link_headers_spec.rb
@@ -25,7 +25,7 @@ describe 'Link headers' do
     end
 
     def link_header_with_type(type)
-      response.headers['Link'].links.find do |link|
+      LinkHeader.parse(response.headers['Link'].to_s).links.find do |link|
         link.attr_pairs.any? { |pair| pair == ['type', type] }
       end
     end
diff --git a/spec/requests/webfinger_request_spec.rb b/spec/requests/webfinger_request_spec.rb
index 48823714e..209fda72a 100644
--- a/spec/requests/webfinger_request_spec.rb
+++ b/spec/requests/webfinger_request_spec.rb
@@ -8,7 +8,7 @@ describe 'The webfinger route' do
       get webfinger_url(resource: alice.to_webfinger_s)
 
       expect(response).to have_http_status(200)
-      expect(response.content_type).to eq 'application/jrd+json'
+      expect(response.media_type).to eq 'application/jrd+json'
     end
   end
 
@@ -17,7 +17,7 @@ describe 'The webfinger route' do
       get webfinger_url(resource: alice.to_webfinger_s, format: :json)
 
       expect(response).to have_http_status(200)
-      expect(response.content_type).to eq 'application/jrd+json'
+      expect(response.media_type).to eq 'application/jrd+json'
     end
 
     it 'returns a json response for json accept header' do
@@ -25,7 +25,7 @@ describe 'The webfinger route' do
       get webfinger_url(resource: alice.to_webfinger_s), headers: headers
 
       expect(response).to have_http_status(200)
-      expect(response.content_type).to eq 'application/jrd+json'
+      expect(response.media_type).to eq 'application/jrd+json'
     end
   end
 end