helpwithcovid / covid-volunteers

Organizing and matching volunteers with COVID-19 projects
https://helpwithcovid.com
MIT License
96 stars 76 forks source link

Test correct calling of asset_pack_path instead of testing its return value #267

Closed shen-sat closed 4 years ago

shen-sat commented 4 years ago

We were previously testing the return value of this line in the Project model within its cover_photo method: ActionController::Base.helpers.asset_pack_path "media/images/#{filename}-default.png"

As we do not have control over the inner workings of ActionController::Base.helpers.asset_pack_path, only the parameter that we feed it, this PR changes the spec to test the parameter we give to ActionController::Base.helpers.asset_pack_path

cc @jamiew