scinote-web/spec/controllers/client_api/activities_controller_spec.rb

21 lines
544 B
Ruby
Raw Normal View History

2017-12-14 21:02:40 +08:00
require 'rails_helper'
2018-01-31 19:05:45 +08:00
describe ClientApi::ActivitiesController, type: :controller, broken: true do
2017-12-14 21:02:40 +08:00
login_user
render_views
before do
project = create :project, created_by: User.first
UserProject.create(user: User.first, project: project, role: 2)
create :activity, user: User.first, project: project
end
describe '#index' do
it 'returns a valid object' do
get :index, format: :json
expect(response.status).to eq(200)
expect(response.body).to match_response_schema('activities')
end
end
end