many changes

This commit is contained in:
2012-12-03 18:39:36 +01:00
parent e3dc6a7c68
commit 7d64ab2022
37 changed files with 540 additions and 101 deletions
@@ -9,8 +9,12 @@ feature 'Supplier main board spec.rb', %q{
create_supplier 'supplier@qwaiter.com'
create_user 'user@qwaiter.com'
end
def create_active_list(options = {})
end
scenario 'loaded orders should have a list_id present for handling actions' do
create_active_list
login_supplier_as 'supplier@qwaiter.com'
end
@@ -0,0 +1,4 @@
require 'spec_helper'
describe ProductDecorator do
end
+1
View File
@@ -1,5 +1,6 @@
FactoryGirl.define do
factory :list do
association :table
association :supplier
end
end
+6
View File
@@ -0,0 +1,6 @@
FactoryGirl.define do
factory :user do
email "test@example.com"
password "secret"
end
end
+13
View File
@@ -14,4 +14,17 @@ describe List do
end
end
describe :mark_as_payed do
it "should set payed_at to a time" do
@list.payed_at.should be_nil
@list.mark_as_payed
@list.payed_at.should be_kind_of Time
end
it "should set is_payed to true" do
@list.is_payed.should be_false
@list.mark_as_payed
@list.is_payed.should be_true
end
end
end
+6
View File
@@ -0,0 +1,6 @@
require 'spec_helper'
describe Product do
end