You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Api
module V1
class UsersController < Clearance::UsersController
respond_to :json
def create
respond_with User.create(user_params)
end
end
end
end
And this spec :
require 'rails_helper'
describe "Users API" do
it 'create a user' do
post "/api/v1/users.json", user: attributes_for(:user), format: :json
expect(response).to be_success
expect(User.count).to eq 1
end
end
I have a this simple controller :
And this spec :
When I run that test, I have this error :
A suggested in the issue : #179, I added
include ActionController::ImplicitRender
and I have this error :At those lines, the responder seems to not respond to
to_json
.The action works in development.
I don't know if it's related to rails-api or to responder. Can you help me?
The text was updated successfully, but these errors were encountered: