mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-20 14:14:09 +01:00
add some tests for contexts page
This commit is contained in:
parent
059dc948c0
commit
83e1e36d73
4 changed files with 70 additions and 7 deletions
|
|
@ -47,7 +47,11 @@ end
|
|||
Given /^I have the following contexts$/ do |table|
|
||||
Context.delete_all
|
||||
table.hashes.each do |hash|
|
||||
context = Factory(:context, hash)
|
||||
context = @current_user.contexts.create!(:name => hash[:name])
|
||||
unless hash[:hide].blank?
|
||||
context.hide = hash[:hide] == true
|
||||
context.save!
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue