mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 21:57:19 +00:00
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
|
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