Simplify the way the embed view is created (#1590)
* Add coverage for embedded status view * Refactor embed view to eliminate @external_links variable
This commit is contained in:
parent
b352a8e5d4
commit
dd1ae3b109
5 changed files with 25 additions and 7 deletions
|
@ -17,4 +17,14 @@ RSpec.describe StreamEntriesController, type: :controller do
|
|||
expect(response).to have_http_status(:success)
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #embed' do
|
||||
it 'returns embedded view of status' do
|
||||
get :embed, params: { account_username: alice.username, id: status.stream_entry.id }
|
||||
|
||||
expect(response).to have_http_status(:success)
|
||||
expect(response.headers['X-Frame-Options']).to eq 'ALLOWALL'
|
||||
expect(response).to render_template(layout: 'embedded')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue