|
|
|
@ -33,6 +33,32 @@ RSpec.describe Api::V1::StatusesController, type: :controller do |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe 'GET #reblogged_by' do |
|
|
|
|
let(:status) { Fabricate(:status, account: user.account) } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
post :reblog, params: { id: status.id } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it 'returns http success' do |
|
|
|
|
get :reblogged_by, params: { id: status.id } |
|
|
|
|
expect(response).to have_http_status(:success) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe 'GET #favourited_by' do |
|
|
|
|
let(:status) { Fabricate(:status, account: user.account) } |
|
|
|
|
|
|
|
|
|
before do |
|
|
|
|
post :favourite, params: { id: status.id } |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
it 'returns http success' do |
|
|
|
|
get :favourited_by, params: { id: status.id } |
|
|
|
|
expect(response).to have_http_status(:success) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
describe 'GET #home' do |
|
|
|
|
it 'returns http success' do |
|
|
|
|
get :home |
|
|
|
|