mercredi 1 avril 2020

how to write rspec test case for a controller method that output json?

I have a controller method which returns calls a modal to get json data. how/what tests to write , when output is json data?

class Homecontroller < ApplicationController
    def show
       req = foo.getjson(); 
       req.post
    end
end

Aucun commentaire:

Enregistrer un commentaire