Add weekday selection and client side date formatting
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user