File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 402402 expect ( ab_user . keys ) . to be_empty
403403 end
404404
405+ context "when an override is present for the experiment" do
406+ it "should not increment the completed counter" do
407+ @params = { "ab_test" => { @experiment_name => @alternative_name } }
408+
409+ expect {
410+ ab_finished ( @experiment_name )
411+ } . not_to change { Split ::Alternative . new ( @alternative_name , @experiment_name ) . completed_count }
412+ end
413+
414+ it "should not touch the user's participation" do
415+ @params = { "ab_test" => { @experiment_name => @alternative_name } }
416+
417+ ab_finished ( @experiment_name )
418+
419+ expect ( ab_user [ @experiment . key ] ) . to eq ( @alternative_name )
420+ expect ( ab_user [ @experiment . finished_key ] ) . to be_nil
421+ end
422+ end
423+
405424 context "when on_trial_complete is set" do
406425 before { Split . configuration . on_trial_complete = :some_method }
407426 it "should call the method" do
You can’t perform that action at this time.
0 commit comments