Convert manifest
controller spec to request spec (#31596)
This commit is contained in:
parent
36ccdcc9e1
commit
5172d84946
2 changed files with 24 additions and 19 deletions
|
@ -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
|
24
spec/requests/manifest_spec.rb
Normal file
24
spec/requests/manifest_spec.rb
Normal 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
|
Loading…
Reference in a new issue