mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-22 00:36:12 +01:00
get context list scenario passing
This commit is contained in:
parent
c9d64e6f4b
commit
7bce774daa
9 changed files with 29 additions and 36 deletions
|
|
@ -3,7 +3,7 @@ Given /^I have no todos$/ do
|
|||
end
|
||||
|
||||
Given /^I have a todo "([^"]*)" in the context "([^"]*)"$/ do |description, context_name|
|
||||
context = @current_user.contexts.find_or_create(:name => context_name)
|
||||
context = @current_user.contexts.find_or_create_by_name(context_name)
|
||||
@todo = @current_user.todos.create!(:context_id => context.id, :description => description)
|
||||
end
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ Given /^I have ([0-9]+) deferred todos$/ do |count|
|
|||
end
|
||||
|
||||
Given /^I have a deferred todo "([^"]*)" in the context "([^"]*)"$/ do |description, context_name|
|
||||
context = @current_user.contexts.find_or_create(:name => context_name)
|
||||
context = @current_user.contexts.find_or_create_by_name(context_name)
|
||||
todo = @current_user.todos.create!(:context_id => context.id, :description => description)
|
||||
todo.show_from = @current_user.time + 1.week
|
||||
todo.save!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue