add order uuid generation spec, add skeleton for PreorderController spec

This commit is contained in:
Nikalyukin Mikhail
2012-12-01 14:08:23 +02:00
parent 34f7a42b51
commit c67e5ec5bf
3 changed files with 22 additions and 9 deletions

1
.gitignore vendored
View File

@@ -19,3 +19,4 @@ config/settings/*.local.yml
config/environments/*.local.yml
*.sublime-workspace
.rvmrc

View 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

View File

@@ -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' }