mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 02:30: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
|
|
@ -3,8 +3,14 @@ Given /^I have no contexts$/ do
|
|||
Context.delete_all
|
||||
end
|
||||
|
||||
Given /^there exists a context called "([^"]*)" for user "([^"]*)"$/ do |context_name, login|
|
||||
user = User.find_by_login(login)
|
||||
user.should_not be_nil
|
||||
@context = user.contexts.create!(:name => context_name)
|
||||
end
|
||||
|
||||
Given /^I have a context called "([^\"]*)"$/ do |context_name|
|
||||
@context = @current_user.contexts.create!(:name => context_name)
|
||||
Given "there exists a context called \"#{context_name}\" for user \"#{@current_user.login}\""
|
||||
end
|
||||
|
||||
Given /^I have the following contexts:$/ do |table|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue