mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 18:50:12 +01:00
update routing and test for authorized access to all tracks pages
This commit is contained in:
parent
65ecb7b019
commit
29e007f9c6
7 changed files with 102 additions and 37 deletions
|
|
@ -15,6 +15,15 @@ Given /^there exists a project "([^\"]*)" for user "([^\"]*)"$/ do |project_name
|
|||
user.projects.create!(:name => project_name)
|
||||
end
|
||||
|
||||
Given /^there exists a project called "([^"]*)" for user "([^"]*)"$/ do |project_name, login|
|
||||
# TODO: regexp change to integrate this with the previous since only 'called' is different
|
||||
Given "there exists a project \"#{project_name}\" for user \"#{login}\""
|
||||
end
|
||||
|
||||
Given /^I have a project called "([^"]*)"$/ do |project_name|
|
||||
Given "there exists a project \"#{project_name}\" for user \"#{@current_user.login}\""
|
||||
end
|
||||
|
||||
When /^I visit the "([^\"]*)" project$/ do |project_name|
|
||||
@project = Project.find_by_name(project_name)
|
||||
@project.should_not be_nil
|
||||
|
|
@ -25,7 +34,6 @@ When /^I visit the project page for "([^"]*)"$/ do |project_name|
|
|||
When "I visit the \"#{project_name}\" project"
|
||||
end
|
||||
|
||||
|
||||
When /^I edit the project description to "([^\"]*)"$/ do |new_description|
|
||||
click_link "link_edit_project_#{@project.id}"
|
||||
fill_in "project[description]", :with => new_description
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue