Fix trade activity tests: use a valid item fixture, not a placeholder
In 540ce08caa
, I updated the Item class
to be more explicit about what fields are required, so this test would
fail in a more helpful way, instead of just crashing from `name` being
`nil` when trying to infer the Dyeworks info.
Now, we update the test to use Rails's standard "fixture" system to set
up a more-correct placeholder item, instead!
This commit is contained in:
parent
540ce08caa
commit
9726ecb1a5
2 changed files with 14 additions and 6 deletions
14
test/fixtures/items.yml
vendored
Normal file
14
test/fixtures/items.yml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
straw_hat:
|
||||
id: 58
|
||||
name: Straw Hat
|
||||
description: "This straw hat will keep the sun out of your pets eyes in
|
||||
bright sunlight."
|
||||
thumbnail_url: https://images.neopets.com/items/straw-hat.gif
|
||||
type: Clothes
|
||||
category: Clothes
|
||||
rarity: Very Rare
|
||||
rarity_index: 90
|
||||
price: 376
|
||||
weight_lbs: 1
|
||||
zones_restrict: 0000000000000000000000000001000000001010000000000000
|
||||
species_support_ids: "35"
|
|
@ -203,12 +203,6 @@ class TradeActivityTest < ActiveSupport::TestCase
|
|||
|
||||
setup do
|
||||
freeze_time # to compare timestamps accurately
|
||||
|
||||
Item.create!(
|
||||
thumbnail_url: "https://images.neopets.com/foo.png",
|
||||
zones_restrict: "",
|
||||
price: 123,
|
||||
)
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in a new issue