mirror of
https://github.com/apigy/selfstarter.git
synced 2026-01-09 22:37:58 -05:00
add order uuid generation spec, add skeleton for PreorderController spec
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -19,3 +19,4 @@ config/settings/*.local.yml
|
||||
config/environments/*.local.yml
|
||||
|
||||
*.sublime-workspace
|
||||
.rvmrc
|
||||
10
spec/controllers/preorder_controller_spec.rb
Normal file
10
spec/controllers/preorder_controller_spec.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe PreorderController do
|
||||
[:index, :checkout].each do |method|
|
||||
it "should get #{method}" do
|
||||
get method
|
||||
response.should be_success
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -12,7 +12,9 @@ describe Order do
|
||||
it { should_not allow_mass_assignment_of :uuid }
|
||||
|
||||
it "generates UUID before validation on_create" do
|
||||
# TODO
|
||||
@order = Order.new
|
||||
@order.valid?
|
||||
@order.uuid.should_not be_nil
|
||||
end
|
||||
|
||||
it { Order.primary_key.should == 'uuid' }
|
||||
|
||||
Reference in New Issue
Block a user