akanshmurthy / railsbridge-testfest

The skeleton app.
MIT License
4 stars 2 forks source link

Create tests for Cloudinary API #6

Closed akanshmurthy closed 7 years ago

siruguri commented 7 years ago

So just tbc, a valid commit would involve adding Paperclip to a model, that causes say an image to be saved locally, and then writing a broken test?

akanshmurthy commented 7 years ago

Just like the Bitly section, imagine there is a section on the create post page, where a user can upload an image and get a link to the hosted image. The user can put that image in the body so that it is rendered in the post. Essentially, Cloudinary here would be acting as a CDN. Let's use Cloudinary as it is simple to set up. To be clear, we are NOT writing broken tests. We are writing functional tests as we had discussed on our call. We will break them separately later this week once all the tests are in.

siruguri commented 7 years ago

ok, cool, got it in terms of working tests... so the specific meaning of "get API response" is all that needs clearing up.

akanshmurthy commented 7 years ago

Not sure where you see "get API response"? But, all you might need here is a single test for an outgoing API call. My previous comment could be one implementation someone chooses. But, a student could implement it completely differently and we would want to write a test that doesn't constrain the implementation. I'd say just go with what you think could work for now and we can iterate.

siruguri commented 7 years ago

FYI I'll write this off the HEAD of bitly-test, assuming we aren't too far from accepting that PR

schaui6 commented 7 years ago

@siruguri PR merged, you're good to go :)