Sha256: 8d472574c71175aa88bbc746744ea93196a12a45f432e82bf462754a1ca0535b

Contents?: true

Size: 1.71 KB

Versions: 13

Compression:

Stored size: 1.71 KB

Contents

require 'spec/spec_helper'

describe Admin::Shop::VariantsController do
  
  dataset :users, :shop_variants
  
  before(:each) do
    login_as  :admin
  end
  
  describe '#new' do
    context 'instance variables' do
      it 'should be assigned' do
        get :new
        
        assigns(:inputs).should   === ['name','options']
        assigns(:meta).should     === []
        assigns(:buttons).should  === []
        assigns(:parts).should    === []
        assigns(:popups).should   === []
      end
    end
  end
  
  describe '#edit' do
    context 'instance variables' do
      it 'should be assigned' do
        get :edit, :id => shop_variants(:bread_states).id
        
        assigns(:inputs).should   === ['name','options']
        assigns(:meta).should     === []
        assigns(:buttons).should  === []
        assigns(:parts).should    === []
        assigns(:popups).should   === []
      end
    end
  end
  
  describe '#create' do
    context 'instance variables' do
      it 'should be assigned' do
        post :create, :shop_variant => {}
        
        assigns(:inputs).should   === ['name','options']
        assigns(:meta).should     === []
        assigns(:buttons).should  === []
        assigns(:parts).should    === []
        assigns(:popups).should   === []
      end
    end
  end
  
  describe '#update' do
    context 'instance variables' do
      it 'should be assigned' do
        put :update, :id => shop_variants(:bread_states).id, :shop_variant => {}
        
        assigns(:inputs).should   === ['name','options']
        assigns(:meta).should     === []
        assigns(:buttons).should  === []
        assigns(:parts).should    === []
        assigns(:popups).should   === []
      end
    end
  end
  
end

Version data entries

13 entries across 13 versions & 2 rubygems

Version Path
radiant-shop_variants-extension-0.1.3 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.1.2 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.1.1 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.1.0 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.0.4 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.0.3 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop_variants-extension-0.0.1 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.6 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.5 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.4 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.3 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.1 spec/controllers/admin/shop/variants_controller_spec.rb
radiant-shop-extension-0.11.0 spec/controllers/admin/shop/variants_controller_spec.rb