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 13:57:15 +0100
committerClaire <claire.github-309c@sitedethib.com>2021-03-19 13:57:15 +0100
commit3ad6ef72cb3a02135a0f395a8a46323e86c4b334 (patch)
treeff1f1d15a80f5420c52afd4d975b44c0afe1194e /spec/requests
parentba22398c38067e05f141a0dddeb20bf68913988a (diff)
parent741d0952b174740e70a09fe6db6862624dfe1e44 (diff)
Merge branch 'main' into glitch-soc/merge-upstream
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