mirror of https://github.com/mastodon/mastodon
Convert `manifest` controller spec to request spec (#31596)
This commit is contained in:
parent
36ccdcc9e1
commit
5172d84946
|
@ -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
|
|
@ -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 New Issue