Skip to content
Snippets Groups Projects
Commit 421e882e authored by Douwe Maan's avatar Douwe Maan
Browse files

Fix specs.

parent d702a252
No related branches found
No related tags found
No related merge requests found
Loading
@@ -27,11 +27,11 @@ Feature: Dashboard
Loading
@@ -27,11 +27,11 @@ Feature: Dashboard
Scenario: I should see User joined Project event Scenario: I should see User joined Project event
Given user with name "John Doe" joined project "Shop" Given user with name "John Doe" joined project "Shop"
When I visit dashboard page When I visit dashboard page
Then I should see "John Doe joined project at Shop" event Then I should see "John Doe joined project Shop" event
   
@javascript @javascript
Scenario: I should see User left Project event Scenario: I should see User left Project event
Given user with name "John Doe" joined project "Shop" Given user with name "John Doe" joined project "Shop"
And user with name "John Doe" left project "Shop" And user with name "John Doe" left project "Shop"
When I visit dashboard page When I visit dashboard page
Then I should see "John Doe left project at Shop" event Then I should see "John Doe left project Shop" event
Loading
@@ -37,8 +37,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
Loading
@@ -37,8 +37,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
) )
end end
   
step 'I should see "John Doe joined project at Shop" event' do step 'I should see "John Doe joined project Shop" event' do
page.should have_content "John Doe joined project at #{project.name_with_namespace}" page.should have_content "John Doe joined project #{project.name_with_namespace}"
end end
   
step 'user with name "John Doe" left project "Shop"' do step 'user with name "John Doe" left project "Shop"' do
Loading
@@ -50,8 +50,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
Loading
@@ -50,8 +50,8 @@ class Spinach::Features::Dashboard < Spinach::FeatureSteps
) )
end end
   
step 'I should see "John Doe left project at Shop" event' do step 'I should see "John Doe left project Shop" event' do
page.should have_content "John Doe left project at #{project.name_with_namespace}" page.should have_content "John Doe left project #{project.name_with_namespace}"
end end
   
step 'I have group with projects' do step 'I have group with projects' do
Loading
Loading
Loading
@@ -347,7 +347,7 @@ describe API::API, api: true do
Loading
@@ -347,7 +347,7 @@ describe API::API, api: true do
end end
   
describe 'GET /projects/:id/events' do describe 'GET /projects/:id/events' do
before { project_member } before { project_member2 }
   
it 'should return a project events' do it 'should return a project events' do
get api("/projects/#{project.id}/events", user) get api("/projects/#{project.id}/events", user)
Loading
@@ -356,7 +356,7 @@ describe API::API, api: true do
Loading
@@ -356,7 +356,7 @@ describe API::API, api: true do
   
expect(json_event['action_name']).to eq('joined') expect(json_event['action_name']).to eq('joined')
expect(json_event['project_id'].to_i).to eq(project.id) expect(json_event['project_id'].to_i).to eq(project.id)
expect(json_event['author_username']).to eq(user.username) expect(json_event['author_username']).to eq(user3.username)
end end
   
it 'should return a 404 error if not found' do it 'should return a 404 error if not found' do
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment