Commit 792627d4051186317189397d128a69f051a05352
1 parent
68dd3684
Exists in
master
and in
1 other branch
update test to match newest code
Showing
1 changed file
with
1 additions
and
3 deletions
Show diff stats
spec/controllers/choices_controller_spec.rb
| ... | ... | @@ -69,9 +69,7 @@ describe ChoicesController do |
| 69 | 69 | |
| 70 | 70 | it "adds visitor_id params to flag if sent" do |
| 71 | 71 | @visitor_identifier = "somelongunique32charstring" |
| 72 | - visitor_list = [mock_visitor] | |
| 73 | - @user.stub!(:visitors).and_return(visitor_list) | |
| 74 | - visitor_list.should_receive(:find_or_create_by_identifier).with(@visitor_identifier).and_return(mock_visitor) | |
| 72 | + Visitor.should_receive(:find_or_create_by_identifier_and_site_id).with(@visitor_identifier, @user.id).and_return(mock_visitor) | |
| 75 | 73 | |
| 76 | 74 | Flag.should_receive(:create!).with({:choice_id => 123, :question_id => 37, :site_id => @user.id, :explanation => "This is offensive", :visitor_id => mock_visitor.id}) |
| 77 | 75 | ... | ... |
-
mentioned in commit 3527cdd7ea882be49a60976b836fc12a7741bff4