Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove price from Song model because it's handled through the Velkart Product now #192

Open
cbj4074 opened this issue Oct 13, 2020 · 1 comment

Comments

@cbj4074
Copy link
Member

cbj4074 commented Oct 13, 2020

The same is true for albums.full_album_price.

@cbj4074
Copy link
Member Author

cbj4074 commented Jan 4, 2021

@mblarsen You'll probably want to slap me, but this change (removing album.full_album_price) will break a bunch of tests.

Given that we shouldn't store the full-album price in two different places, the test(s) would need to look at $album->asset->product->price, instead of $album->full_album_price.

This isn't a big deal, but we'll need to rework the affected tests.

At this point, I'm trying to reason through the factory-related changes that would need to be made, particularly when using make() instead of create() on the Song and Album factories.

For example, https://github.com/indiehd/web-api/blob/be28f4da802e1ca4c6b67829cf1e555889ee65d8/tests/Feature/Casts/MoneyTest.php references full_album_price in many of its tests. Given this change, those tests can no longer use a simple make() call on the factory, and, at a minimum, will need to use a factory state(s), it seems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant