Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- it "should notify user about successfull update" do
- put :update, :merchant => new_merchant_params
- flash[:notice].should == "Business profile was successfully updated"
- end
- it "should notify user about failed update" do
- @merchant.should_receive(:update_profile).and_return(false)
- put :update, :merchant => new_merchant_params
- flash[:notice].should == "Can't update Business profile"
- end
- it "should render profile page if update failed" do
- @merchant.should_receive(:update_profile).and_return(false)
- put :update, :merchant => new_merchant_params
- response.should render_template('show')
- end
Add Comment
Please, Sign In to add comment