0
0
Fork 0

Writing out more tests, fixed some bugs

This commit is contained in:
Eugen Rochko 2016-03-20 13:03:06 +01:00
parent e14b76c7cb
commit b640f35621
23 changed files with 1069 additions and 41 deletions

View file

@ -1,8 +1,20 @@
require 'rails_helper'
RSpec.describe Api::StatusesController, type: :controller do
let(:user) { Fabricate(:user, account: Fabricate(:account, username: 'alice')) }
let(:token) { double acceptable?: true, resource_owner_id: user.id }
before do
allow(controller).to receive(:doorkeeper_token) { token }
end
describe 'GET #show' do
it 'returns http success'
let(:status) { Fabricate(:status, account: user.account) }
it 'returns http success' do
get :show, id: status.id
expect(response).to have_http_status(:success)
end
end
describe 'GET #home' do