push
circleci
0 of 33 new or added lines in 1 file covered. (0.0%)
9374 existing lines in 213 files now uncovered.47 of 9753 relevant lines covered (0.48%)
0.01 hits per line
| 1 |
# frozen_string_literal: true
|
|
| 2 |
# This class is responsible for assembling the URL for the user
|
|
| 3 |
# to return to the record they were viewing prior to entering the
|
|
| 4 |
# requests system
|
|
|
UNCOV
5
|
class Requests::BackToRecordUrl |
× |
|
UNCOV
6
|
def initialize(input_params) |
× |
|
UNCOV
7
|
@input_params = input_params.permit(:system_id, :open_holdings) |
× |
|
UNCOV
8
|
end
|
× |
| 9 |
|
|
|
UNCOV
10
|
def to_s |
× |
|
UNCOV
11
|
Rails.application.routes.url_helpers.solr_document_path output_params
|
× |
|
UNCOV
12
|
end
|
× |
| 13 |
|
|
|
UNCOV
14
|
private |
× |
| 15 |
|
|
|
UNCOV
16
|
attr_reader :input_params
|
× |
| 17 |
|
|
|
UNCOV
18
|
def output_params |
× |
|
UNCOV
19
|
{ id: system_id, open_holdings: }.compact
|
× |
|
UNCOV
20
|
end
|
× |
| 21 |
|
|
|
UNCOV
22
|
def system_id |
× |
|
UNCOV
23
|
input_params[:system_id]
|
× |
|
UNCOV
24
|
end
|
× |
| 25 |
|
|
|
UNCOV
26
|
def open_holdings |
× |
|
UNCOV
27
|
input_params[:open_holdings]
|
× |
|
UNCOV
28
|
end
|
× |
|
UNCOV
29
|
end
|
× |