Sha256: 93cd0395ae7a391aabb6c02447b8d45a52360bcaed94d8f60c8ff2a0985b0c58

Contents?: true

Size: 2 KB

Versions: 21

Compression:

Stored size: 2 KB

Contents

require File.dirname(__FILE__) + "/../../../spec_helper"

describe Admin::Shop::CustomersController do
  
  dataset :shop_customers, :users
  
  before(:each) do
    login_as  :admin
  end
  
  describe '#new' do
    context 'instance variables' do
      it 'should be assigned' do
        get :new
        
        assigns(:inputs).should   include('name','email')
        assigns(:meta).should     include('login','password','password_confirmation')
        assigns(:buttons).should  include()
        assigns(:parts).should    include()
        assigns(:popups).should   include()
      end
    end
  end
  
  describe '#edit' do
    context 'instance variables' do
      it 'should be assigned' do
        get :edit, :id => shop_customers(:customer).id
        
        assigns(:inputs).should   include('name','email')
        assigns(:meta).should     include('login','password','password_confirmation')
        assigns(:buttons).should  include()
        assigns(:parts).should    include('orders','addresses')
        assigns(:popups).should   include()
      end
    end
  end
  
  describe '#create' do
    context 'instance variables' do
      it 'should be assigned' do
        post :create, :shop_customer => {}
        
        assigns(:inputs).should   include('name','email')
        assigns(:meta).should     include('login','password','password_confirmation')
        assigns(:buttons).should  include()
        assigns(:parts).should    include()
        assigns(:popups).should   include()
      end
    end
  end
  
  describe '#update' do
    context 'instance variables' do
      it 'should be assigned' do
        put :update, :id => shop_customers(:customer).id, :shop_customer => {}
        
        assigns(:inputs).should   include('name','email')
        assigns(:meta).should     include('login','password','password_confirmation')
        assigns(:buttons).should  include()
        assigns(:parts).should    include('orders','addresses')
        assigns(:popups).should   include()
      end
    end
  end
  
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
radiant-shop-extension-0.94.8 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.7 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.6 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.5 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.4 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.3 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.2 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.1 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.94.0 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.93.3 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.93.2 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.93.1 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.93.0 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.11 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.10 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.9 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.8 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.7 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.6 spec/controllers/admin/shop/customers_controller_spec.rb
radiant-shop-extension-0.92.3 spec/controllers/admin/shop/customers_controller_spec.rb