From 1c1afc786397b314e23cb92ebc4e46ec83cd3fbb Mon Sep 17 00:00:00 2001 From: Rafael Reggiani Manzo Date: Mon, 22 Jun 2015 16:56:00 -0300 Subject: [PATCH] Sets user for ProjectAttributes creation on acceptance tests --- features/project/show.feature | 9 ++++++--- features/step_definitions/project_steps.rb | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/features/project/show.feature b/features/project/show.feature index adb6696..50ac6a2 100644 --- a/features/project/show.feature +++ b/features/project/show.feature @@ -27,14 +27,16 @@ Scenario: Should show the create repository link the project owner @kalibro_processor_restart Scenario: Considering the project has no repositories - Given I have a sample project + Given I am a regular user + And I have a sample project And I have sample project_attributes When I am at the Sample Project page Then I should see "There are no Repositories yet!" @kalibro_configuration_restart @kalibro_processor_restart Scenario: Considering the project has repositories - Given I have a sample project + Given I am a regular user + And I have a sample project And I have a sample configuration with native metrics And I have a sample repository within the sample project When I am at the Sample Project page @@ -42,7 +44,8 @@ Scenario: Considering the project has repositories @kalibro_processor_restart Scenario: Checking project contents - Given I have a sample project + Given I am a regular user + And I have a sample project And I have sample project_attributes When I am at the Sample Project page Then the sample project should be there diff --git a/features/step_definitions/project_steps.rb b/features/step_definitions/project_steps.rb index 4e390e4..5decfd8 100644 --- a/features/step_definitions/project_steps.rb +++ b/features/step_definitions/project_steps.rb @@ -9,7 +9,7 @@ Given(/^I have a sample project$/) do end Given(/^I have sample project_attributes$/) do - @project_attributes = FactoryGirl.create(:project_attributes, {id: nil}) + @project_attributes = FactoryGirl.create(:project_attributes, {id: nil, user_id: @user.id}) end Given(/^I have a project named "(.*?)"$/) do |name| -- libgit2 0.21.2