Sha256: a809dbb5b7f7db7470fc5353b98aa5c7b05ae1f2ea577f665ad56a64d98d31dc
Contents?: true
Size: 1.07 KB
Versions: 3
Compression:
Stored size: 1.07 KB
Contents
require 'spec_helper' module MechanizeStore describe MechanizeStore::OrdersController do routes { MechanizeStore::Engine.routes } before do @payment_type = FactoryGirl.create(:mechanize_store_payment_type) @flag = FactoryGirl.create(:mechanize_store_flag) @payment = FactoryGirl.build(:mechanize_store_payment, payment_type: @payment_type, flag: @flag) @order_status = FactoryGirl.create(:mechanize_store_order_status) @freight = FactoryGirl.create(:mechanize_store_freight) @order = FactoryGirl.create(:mechanize_store_order, payment: @payment, order_status: @order_status, freight: @freight) end let(:valid_session) { {} } describe "GET index" do it "assigns all order_statuses as @order_statuses" do get :index, {}, valid_session assigns(:orders).should eq([@order]) end end describe "GET show" do it "assigns the requested order_status as @order_status" do get :show, {:id => @order.to_param}, valid_session assigns(:order).should eq(@order) end end end end
Version data entries
3 entries across 3 versions & 1 rubygems