Add weekday selection and client side date formatting

This commit is contained in:
2013-02-19 09:32:24 +01:00
parent 43073e10f8
commit c5f6813765
17 changed files with 89 additions and 12 deletions
@@ -41,6 +41,7 @@ feature 'Supplier main board spec.rb', %q{
product = create :product, supplier: @supplier
visit '/supplier'
@list.place_order @user, {product.id => 369}
sleep 0.1
page.should have_selector ".of-list-#{@list.id}"
end
end
+14
View File
@@ -0,0 +1,14 @@
require 'spec_helper'
describe ProductCategory do
describe '#week_days' do
let(:product_category) { create :product_category }
subject { product_category }
let(:default) { Array.new(7, 1) }
its(:week_days) { should == default }
it "typecasts strings into integers" do
subject.week_days = Array.new(7, "0")
subject.week_days.should == Array.new(7, 0)
end
end
end