Convert `manifest` controller spec to request spec (#31596)

shrike
Matt Jankowski 2024-08-26 10:37:23 -04:00 committed by GitHub
parent 36ccdcc9e1
commit 5172d84946
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 24 additions and 19 deletions

View File

@ -1,19 +0,0 @@
# frozen_string_literal: true
require 'rails_helper'
describe ManifestsController do
render_views
describe 'GET #show' do
before do
get :show
end
it 'returns http success' do
expect(response).to have_http_status(200)
end
it_behaves_like 'cacheable response'
end
end

View File

@ -0,0 +1,24 @@
# frozen_string_literal: true
require 'rails_helper'
describe 'Manifest' do
describe 'GET /manifest' do
before { get '/manifest' }
it 'returns http success' do
expect(response)
.to have_http_status(200)
.and have_attributes(
content_type: match('application/json')
)
expect(body_as_json)
.to include(
id: '/home',
name: 'Mastodon'
)
end
it_behaves_like 'cacheable response'
end
end