add some tests for contexts page

This commit is contained in:
Reinier Balt 2011-03-28 12:26:54 +02:00
parent 059dc948c0
commit 83e1e36d73
4 changed files with 70 additions and 7 deletions

View file

@ -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