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