module Lucky::RequestExpectations

Overview

Expectations for writing specs for HTTP requests and responses

Defined in:

lucky/request_expectations.cr

Instance Method Summary

Instance Method Detail

def send_json(status, **expected) #

Test that the HTTP response has the expected status and JSON body

user = UserFactory.create

response = AppClient.new.exec(Users::Show.with(user.id))

response.should send_json(200, name: user.name, age: user.age)

[View source]