diff options
| author | Teddy Wing | 2017-09-01 18:03:16 +0200 | 
|---|---|---|
| committer | Teddy Wing | 2017-09-01 18:03:16 +0200 | 
| commit | af050e3cbd7b6d931dbf7faf9ed1e3a9cf3cf6f7 (patch) | |
| tree | 498ec603ed1508aebd517859db9db44651b41a92 /spec/helpers | |
| parent | df64a6dcbc38cefe41c74bcb1d2d166d13711b23 (diff) | |
| download | chouette-core-af050e3cbd7b6d931dbf7faf9ed1e3a9cf3cf6f7.tar.bz2 | |
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 `<a>`s for
links.
Diffstat (limited to 'spec/helpers')
| -rw-r--r-- | spec/helpers/table_builder_helper_spec.rb | 15 | 
1 files 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, | 
