Sha256: 62fee1c13532e0be56dfbe8f1c63aa549f8800459a03ed9cb97c165c1586095d

Contents?: true

Size: 814 Bytes

Versions: 3

Compression:

Stored size: 814 Bytes

Contents

require "#{File.dirname(__FILE__)}/../../../spec_helper"

describe Admin::Shop::DiscountsController do
  
  dataset :users, :shop_discounts
  
  before :each do
    login_as users(:admin)
  end
  
  it 'should assign packages to the #edit method' do
    get :edit, :id => shop_discounts(:ten_percent).id
    
    assigns(:buttons).include?('browse_packages').should be_true
    assigns(:parts).include?('packages').should be_true
    assigns(:popups).include?('browse_packages').should be_true
  end
  
  it 'should assign packages to the #edit method' do
    put :update, :id => shop_discounts(:ten_percent).id
    
    assigns(:buttons).include?('browse_packages').should be_true
    assigns(:parts).include?('packages').should be_true
    assigns(:popups).include?('browse_packages').should be_true
  end
  
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
radiant-shop_packages-extension-0.0.6 spec/controllers/admin/shop/discounts_controller_spec.rb
radiant-shop_packages-extension-0.0.5 spec/controllers/admin/shop/discounts_controller_spec.rb
radiant-shop_packages-extension-0.0.4 spec/controllers/admin/shop/discounts_controller_spec.rb