Commit a801d1d1678f619f4db299f8f1d55733d93145d8

Authored by João M. M. Silva + Guilherme Rojas V. de Lima
Committed by Rafael Manzo
1 parent 0d4ed835

create feature test fixed to test user permission

features/project/create.feature
... ... @@ -3,11 +3,12 @@ Feature: Project Creation
3 3 As a regular user
4 4 I should be able to create projects
5 5  
6   - # This will fail until do the authentication to project.
7   - @wip
  6 + @kalibro_restart
8 7 Scenario: Should not create project without login
9 8 Given I am at the All Projects page
10   - Then I should not see New Project
  9 + When I click the New Project link
  10 + Then I should be in the Login page
  11 + And I should see You need to sign in or sign up before continuing.
11 12  
12 13 @kalibro_restart
13 14 Scenario: project creation
... ...
features/step_definitions/project_steps.rb
... ... @@ -46,6 +46,10 @@ Then(/^I should be in the Edit Project page$/) do
46 46 page.should have_content("Edit Project")
47 47 end
48 48  
  49 +Then(/^I should be in the Login page$/) do
  50 + page.should have_content("Sign in")
  51 +end
  52 +
49 53 Then(/^the sample project should not be there$/) do
50 54 expect { Project.find(@project.id) }.to raise_error
51 55 end
... ...