Skip to content

Commit

Permalink
fix: using hard-coded partner key values
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticspoon committed May 3, 2024
1 parent 2846a5f commit 05a7500
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions spec/models/base_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@

describe "->by_partner_key" do
it "shows the Base Items by partner_key" do
base_item = create(:base_item)
expect(BaseItem.by_partner_key(base_item.partner_key).size).to eq(1)
base_item = create(:base_item, partner_key: "UniqueString")
expect(BaseItem.by_partner_key("UniqueString").size).to eq(1)
expect(BaseItem.by_partner_key("random_string").size).to eq(0)
end
end
Expand Down
7 changes: 4 additions & 3 deletions spec/models/inventory_item_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@

context "Filtering >" do
describe "->by_partner_key" do
it "shows the Base Items by partner_key" do
item = create(:inventory_item)
expect(InventoryItem.by_partner_key(item.item.partner_key).size).to eq(1)
it "shows the Inventory Items by partner_key" do
create(:base_item, partner_key: "UniqueString")
create(:inventory_item, item: create(:item, partner_key: "UniqueString"))
expect(InventoryItem.by_partner_key("UniqueString").size).to eq(1)
end
end
end
Expand Down

0 comments on commit 05a7500

Please sign in to comment.