mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-23 10:40:13 +01:00
migrate deleting of contexts
This commit is contained in:
parent
15fdb1e572
commit
e52a8609c7
10 changed files with 124 additions and 31 deletions
|
|
@ -3,14 +3,28 @@ Given /^I have no contexts$/ do
|
|||
Context.delete_all
|
||||
end
|
||||
|
||||
Given /^there exists a context called "([^"]*)" for user "([^"]*)"$/ do |context_name, login|
|
||||
Given /^there exists an active 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)
|
||||
@context = user.contexts.create!(:name => context_name, :hide => false)
|
||||
end
|
||||
|
||||
Given /^there exists a hidden 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, :hide => true)
|
||||
end
|
||||
|
||||
Given /^I have a context called "([^\"]*)"$/ do |context_name|
|
||||
Given "there exists a context called \"#{context_name}\" for user \"#{@current_user.login}\""
|
||||
Given "there exists an active context called \"#{context_name}\" for user \"#{@current_user.login}\""
|
||||
end
|
||||
|
||||
Given /^I have an active context called "([^\"]*)"$/ do |context_name|
|
||||
Given "there exists an active context called \"#{context_name}\" for user \"#{@current_user.login}\""
|
||||
end
|
||||
|
||||
Given /^I have a hidden context called "([^\"]*)"$/ do |context_name|
|
||||
Given "there exists a hidden 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