Sha256: 3cd63aef572f2ea6a883c41499c3dfe2858a2c0101733d47014d960ef0b72c8e
Contents?: true
Size: 699 Bytes
Versions: 4
Compression:
Stored size: 699 Bytes
Contents
require 'spec_helper' describe Spree::Account::FavouritesController do describe "index" do let(:complete_orders) { double(Array) } let(:user_orders) { double(Array, complete: complete_orders) } let(:user) { mock_model Spree::User, :last_incomplete_spree_order => nil, :has_spree_role? => true, :spree_api_key => 'fake', :orders => user_orders } before :each do controller.stub :spree_current_user => user controller.stub :check_authorization end it 'should redirect to login if user is not logged in' do controller.stub(:spree_current_user).and_return nil spree_get :index response.should redirect_to(spree.login_path) end end end
Version data entries
4 entries across 4 versions & 1 rubygems