It's killing me already. What am I doing wrong, or is this a legit bug?
My test w/out a token passes, and with fails. More precise details below.
(Nice photo, can't even believe you can be a nodejs developer.)
Seems you can not mix JSON body .send({}) with multipart form-data body .attach(), in that case the JSON will be ignored by supertest. Instead you can stick with multipart form-data and try this:
.set('Accept', 'application.json')
.field('token', config.token)
.field('vehicle_vin', "randomVIN")
.attach('file', '/Users/moi/Desktop/unit_test_extravaganza/hardwork.jpg')
wow so that really happened :| gross
@rafis It's been three years, but what gives you the right to say something like that? @lovelydreamer Can be just as good a developer as anyone can.
@rafis didn't know cats could be developers either 馃檮
Most helpful comment
@rafis It's been three years, but what gives you the right to say something like that? @lovelydreamer Can be just as good a developer as anyone can.