Commit 1c1afc786397b314e23cb92ebc4e46ec83cd3fbb
1 parent
21e04e6a
Exists in
colab
and in
4 other branches
Sets user for ProjectAttributes creation on acceptance tests
Showing
2 changed files
with
7 additions
and
4 deletions
Show diff stats
features/project/show.feature
| @@ -27,14 +27,16 @@ Scenario: Should show the create repository link the project owner | @@ -27,14 +27,16 @@ Scenario: Should show the create repository link the project owner | ||
| 27 | 27 | ||
| 28 | @kalibro_processor_restart | 28 | @kalibro_processor_restart |
| 29 | Scenario: Considering the project has no repositories | 29 | Scenario: Considering the project has no repositories |
| 30 | - Given I have a sample project | 30 | + Given I am a regular user |
| 31 | + And I have a sample project | ||
| 31 | And I have sample project_attributes | 32 | And I have sample project_attributes |
| 32 | When I am at the Sample Project page | 33 | When I am at the Sample Project page |
| 33 | Then I should see "There are no Repositories yet!" | 34 | Then I should see "There are no Repositories yet!" |
| 34 | 35 | ||
| 35 | @kalibro_configuration_restart @kalibro_processor_restart | 36 | @kalibro_configuration_restart @kalibro_processor_restart |
| 36 | Scenario: Considering the project has repositories | 37 | Scenario: Considering the project has repositories |
| 37 | - Given I have a sample project | 38 | + Given I am a regular user |
| 39 | + And I have a sample project | ||
| 38 | And I have a sample configuration with native metrics | 40 | And I have a sample configuration with native metrics |
| 39 | And I have a sample repository within the sample project | 41 | And I have a sample repository within the sample project |
| 40 | When I am at the Sample Project page | 42 | When I am at the Sample Project page |
| @@ -42,7 +44,8 @@ Scenario: Considering the project has repositories | @@ -42,7 +44,8 @@ Scenario: Considering the project has repositories | ||
| 42 | 44 | ||
| 43 | @kalibro_processor_restart | 45 | @kalibro_processor_restart |
| 44 | Scenario: Checking project contents | 46 | Scenario: Checking project contents |
| 45 | - Given I have a sample project | 47 | + Given I am a regular user |
| 48 | + And I have a sample project | ||
| 46 | And I have sample project_attributes | 49 | And I have sample project_attributes |
| 47 | When I am at the Sample Project page | 50 | When I am at the Sample Project page |
| 48 | Then the sample project should be there | 51 | Then the sample project should be there |
features/step_definitions/project_steps.rb
| @@ -9,7 +9,7 @@ Given(/^I have a sample project$/) do | @@ -9,7 +9,7 @@ Given(/^I have a sample project$/) do | ||
| 9 | end | 9 | end |
| 10 | 10 | ||
| 11 | Given(/^I have sample project_attributes$/) do | 11 | Given(/^I have sample project_attributes$/) do |
| 12 | - @project_attributes = FactoryGirl.create(:project_attributes, {id: nil}) | 12 | + @project_attributes = FactoryGirl.create(:project_attributes, {id: nil, user_id: @user.id}) |
| 13 | end | 13 | end |
| 14 | 14 | ||
| 15 | Given(/^I have a project named "(.*?)"$/) do |name| | 15 | Given(/^I have a project named "(.*?)"$/) do |name| |