Sha256: 0a8a686f5376c6e7c9d6ef9f79e12a8e48c99784f0f61bd57a2046a2b3db5980
Contents?: true
Size: 811 Bytes
Versions: 39
Compression:
Stored size: 811 Bytes
Contents
require 'spec_helper' describe CollectionsController do render_views before(:all) do @agent = Agent.create!(:title => 'test') @terminal = Terminal.make!(:keyword => 'test', :agent => @agent) end it "creates" do post :create, :terminal => 'foobar' response.status.should == 404 post :create, :terminal => 'test' response.status.should == 400 post :create, :terminal => 'test', :collection => { :session_ids => ['111', '222'], :collected_at => DateTime.now, :banknotes => { '10' => 14, '1000' => 1 } } response.status.should == 200 collection = @terminal.collections.first response.body.should == @terminal.collections.first.id.to_s collection.banknotes.should == {'10' => '14', '1000' => '1'} end end
Version data entries
39 entries across 39 versions & 1 rubygems