2016-12-01 09:01:03 +11:00
|
|
|
require 'rails_helper'
|
|
|
|
|
2017-01-23 23:36:17 +11:00
|
|
|
RSpec.describe Api::OEmbedController, type: :controller do
|
2017-05-31 06:30:06 +10:00
|
|
|
render_views
|
|
|
|
|
2017-01-23 23:36:17 +11:00
|
|
|
let(:alice) { Fabricate(:account, username: 'alice') }
|
|
|
|
let(:status) { Fabricate(:status, text: 'Hello world', account: alice) }
|
2016-12-01 09:01:03 +11:00
|
|
|
|
2017-01-23 23:36:17 +11:00
|
|
|
describe 'GET #show' do
|
|
|
|
before do
|
2017-09-03 01:42:47 +10:00
|
|
|
request.host = Rails.configuration.x.local_domain
|
2017-01-23 23:36:17 +11:00
|
|
|
get :show, params: { url: account_stream_entry_url(alice, status.stream_entry) }, format: :json
|
|
|
|
end
|
|
|
|
|
|
|
|
it 'returns http success' do
|
2018-04-22 05:35:07 +10:00
|
|
|
expect(response).to have_http_status(200)
|
2017-01-23 23:36:17 +11:00
|
|
|
end
|
|
|
|
end
|
2016-12-01 09:01:03 +11:00
|
|
|
end
|