Remove unneeded to_s on Link header comparison in statuses controller spec (#31941)

This commit is contained in:
Matt Jankowski 2024-09-18 04:21:31 -04:00 committed by GitHub
parent 6f3d7516dc
commit 943738671c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -63,7 +63,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('public'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -79,7 +79,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -168,7 +168,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -184,7 +184,7 @@ RSpec.describe StatusesController do
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -212,7 +212,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -228,7 +228,7 @@ RSpec.describe StatusesController do
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -278,7 +278,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -294,7 +294,7 @@ RSpec.describe StatusesController do
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -370,7 +370,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -385,7 +385,7 @@ RSpec.describe StatusesController do
.and have_cacheable_headers.with_vary('Accept, Accept-Language, Cookie')
expect(response.headers).to include(
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -412,7 +412,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -428,7 +428,7 @@ RSpec.describe StatusesController do
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
@ -479,7 +479,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.body).to include status.text
end
@ -495,7 +495,7 @@ RSpec.describe StatusesController do
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('private'),
'Content-Type' => include('application/activity+json'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
expect(response.parsed_body)
.to include(content: include(status.text))
@ -779,7 +779,7 @@ RSpec.describe StatusesController do
expect(response.headers).to include(
'Vary' => 'Accept, Accept-Language, Cookie',
'Cache-Control' => include('public'),
'Link' => satisfy { |header| header.to_s.include?('activity+json') }
'Link' => include('activity+json')
)
end
end