diff options
| author | Teddy Wing | 2017-06-15 11:17:00 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-06-15 11:17:00 +0200 |
| commit | 2a7b858f9bd5a8b2a8bd8b9913ab39e24201e89f (patch) | |
| tree | e4ad1ad05c8d8f7a3cbf06e5c44386e06c682c48 /spec/helpers | |
| parent | 0f013cdbb198956d095df5b0bb15a7ac9dac98d0 (diff) | |
| download | chouette-core-2a7b858f9bd5a8b2a8bd8b9913ab39e24201e89f.tar.bz2 | |
TableBuilder spec: Change decoration to use `ModelDecorator`
Instead of mapping over the objects and decorating them manually, use
the `ModelDecorator` collection decorator to do it. This is what the
actual code does, so we should be doing the same in our test.
Refs #3479
Diffstat (limited to 'spec/helpers')
| -rw-r--r-- | spec/helpers/table_builder_helper_spec.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/spec/helpers/table_builder_helper_spec.rb b/spec/helpers/table_builder_helper_spec.rb index c855e54c3..86bc02093 100644 --- a/spec/helpers/table_builder_helper_spec.rb +++ b/spec/helpers/table_builder_helper_spec.rb @@ -39,7 +39,10 @@ describe TableBuilderHelper, type: :helper do id: referentials[0].workbench.id }) - referentials.map! { |referential| referential.decorate } + referentials = ModelDecorator.decorate( + referentials, + with: ReferentialDecorator + ) expected = <<-HTML <table class="table has-filter has-search"> |
