From af050e3cbd7b6d931dbf7faf9ed1e3a9cf3cf6f7 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 1 Sep 2017 18:03:16 +0200 Subject: TableBuilderHelper spec: Update with `Column#link_to` calls The `TableBuilderHelper` now requires you to specify a `link_to` attribute in a column you want to make a link out of instead of doing it automagically as before. Update the tests to do this and continue to output the right ``s for links. --- spec/helpers/table_builder_helper_spec.rb | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb index c536a4c62..e17196a19 100644 --- a/spec/helpers/table_builder_helper_spec.rb +++ b/spec/helpers/table_builder_helper_spec.rb @@ -96,7 +96,10 @@ describe TableBuilderHelper, type: :helper do [ TableBuilderHelper::Column.new( key: :name, - attribute: 'name' + attribute: 'name', + link_to: lambda do |referential| + referential_path(referential) + end ), TableBuilderHelper::Column.new( key: :status, @@ -238,7 +241,10 @@ describe TableBuilderHelper, type: :helper do ), TableBuilderHelper::Column.new( key: :name, - attribute: 'name' + attribute: 'name', + link_to: lambda do |company| + referential_company_path(referential, company) + end ), TableBuilderHelper::Column.new( key: :phone, @@ -347,7 +353,10 @@ describe TableBuilderHelper, type: :helper do ), TableBuilderHelper::Column.new( key: :name, - attribute: 'name' + attribute: 'name', + link_to: lambda do |company| + referential_company_path(referential, company) + end ), TableBuilderHelper::Column.new( key: :phone, -- cgit v1.2.3