Skip to content

Commit 7664d93

Browse files
linter
1 parent 1f08698 commit 7664d93

4 files changed

Lines changed: 5 additions & 6 deletions

File tree

app/controllers/requests_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ def index
1212
end
1313

1414
def show
15-
@request_info = View::RequestInfo.from_params(params:, organization: current_organization)
15+
@request_info = View::RequestInfo.from_params(params:, organization: current_organization)
1616
end
1717

1818
# Clicking the "New Distribution" button will set the the request to started

app/models/view/request_info.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ module View
22
RequestInfo = Data.define(
33
:request
44
) do
5-
65
class << self
76
def from_params(params:, organization:)
87
request = organization.requests.find(params[:id])

spec/models/view/request_info_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
describe "#custom_units" do
3737
context "when there are request units for an item request" do
38-
context "when enable_packs is disabled" do
38+
context "when enable_packs is disabled" do
3939
it "returns false" do
4040
organization = build(:organization)
4141
item = build(:item, name: "First item")
@@ -45,7 +45,7 @@
4545
:with_item_requests,
4646
organization:,
4747
request_items: [
48-
{item_id: item.id, quantity: '559', request_unit: 'flat'}
48+
{item_id: item.id, quantity: "559", request_unit: "flat"}
4949
]
5050
)
5151

@@ -67,7 +67,7 @@
6767
:with_item_requests,
6868
organization:,
6969
request_items: [
70-
{item_id: item.id, quantity: '559', request_unit: 'flat'},
70+
{item_id: item.id, quantity: "559", request_unit: "flat"}
7171
]
7272
)
7373
request = View::RequestInfo.from_params(params: {id: request.id}, organization:)

spec/models/view/requests_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
it "returns the calculated product total items" do
1717
organization = build(:organization)
1818
build(:request, :pending, organization:)
19-
total_items_service_double = instance_double(RequestsTotalItemsService, calculate: {"Diaper" => 10})
19+
total_items_service_double = instance_double(RequestsTotalItemsService, calculate: {"Diaper" => 10})
2020
allow(RequestsTotalItemsService).to receive(:new).with(requests: organization.requests).and_return(total_items_service_double)
2121

2222
requests = View::Requests.from_params(params: {}, organization:, helpers:)

0 commit comments

Comments
 (0)