OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/features/step_definitions/issue_steps.rb

9 lines
434 B

Given /^the issue "(.*?)" is watched by:$/ do |issue_subject, watchers|
issue = Issue.find(:last, :conditions => {:subject => issue_subject}, :order => :created_on)
watchers.raw.flatten.each {|w| issue.add_watcher User.find_by_login(w)}
issue.save
end
Then /^the issue "(.*?)" should have (\d+) watchers$/ do |issue_subject, watcher_count|
Issue.find_by_subject(issue_subject).watchers.count.should == watcher_count.to_i
end