And we are green
This commit is contained in:
@@ -21,7 +21,7 @@ div.page-header= title :index, model_class
|
|||||||
- @tables.each do |table|
|
- @tables.each do |table|
|
||||||
tr
|
tr
|
||||||
td.link= link_to table.number, [:suppliers, table]
|
td.link= link_to table.number, [:suppliers, table]
|
||||||
td.link= link_to_if table.section.present?, table.section.try(:title), tables_view_suppliers_section_path(table.section)
|
td.link= link_to_if table.section.present?, table.section.try(:title), [:suppliers, table.section]
|
||||||
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
td.timestamp data-time=table.created_at.try(:utc).try(:iso8601)
|
||||||
td.actions
|
td.actions
|
||||||
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
= link_to t('helpers.links.edit'), [:edit, :suppliers, table], class: 'btn btn-mini', data: {t: 'helpers.links.edit'}
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ describe Suppliers::SectionsController do
|
|||||||
it "renders the #show view" do
|
it "renders the #show view" do
|
||||||
section = create :section, supplier: @supplier
|
section = create :section, supplier: @supplier
|
||||||
get :show, id: section
|
get :show, id: section
|
||||||
response.should render_template :show
|
response.should render_template :tables_view
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ describe Order do
|
|||||||
describe '.for_supplier' do
|
describe '.for_supplier' do
|
||||||
before { order }
|
before { order }
|
||||||
it 'works' do
|
it 'works' do
|
||||||
Order.for_supplier(supplier).should == order
|
Order.for_supplier(supplier).should == [order]
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'paginates'
|
it 'paginates'
|
||||||
|
|||||||
@@ -7,28 +7,34 @@ describe :section do
|
|||||||
|
|
||||||
describe :path do
|
describe :path do
|
||||||
describe :width do
|
describe :width do
|
||||||
it "should have zero width when initialized" do
|
it "should have 20 width when initialized" do
|
||||||
Section.new.width.should be_zero
|
Section.new.width.should == 20
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should have new width when it is defined using a setter" do
|
it "should have new width when it is defined using a setter" do
|
||||||
@section.width = 3.2
|
@section.width = 3.2
|
||||||
@section.width.should == 3.2
|
@section.width.should == 3.2
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should persist width property through database" do
|
it "should persist width property through database" do
|
||||||
@section.width = 3.2
|
@section.width = 3.2
|
||||||
@section.save
|
@section.save
|
||||||
@reloaded_section = Section.find(@section.id)
|
@reloaded_section = Section.find(@section.id)
|
||||||
@reloaded_section.width.should == 3.2
|
@reloaded_section.width.should == 3.2
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
describe :height do
|
describe :height do
|
||||||
it "should have zero height when initialized" do
|
|
||||||
Section.new.height.should be_zero
|
it "should have 30 height when initialized" do
|
||||||
|
Section.new.height.should == 30
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should have new height when it is defined using a setter" do
|
it "should have new height when it is defined using a setter" do
|
||||||
@section.height = 3.2
|
@section.height = 3.2
|
||||||
@section.height.should == 3.2
|
@section.height.should == 3.2
|
||||||
end
|
end
|
||||||
|
|
||||||
it "should persist height property through database" do
|
it "should persist height property through database" do
|
||||||
@section.height = 3.2
|
@section.height = 3.2
|
||||||
@section.save
|
@section.save
|
||||||
|
|||||||
Reference in New Issue
Block a user