Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save gustavonovaes/95e5f91dd8421b2cda58bc6f45268733 to your computer and use it in GitHub Desktop.
Save gustavonovaes/95e5f91dd8421b2cda58bc6f45268733 to your computer and use it in GitHub Desktop.
Controller
index_status_code_should_be_200
index_should_return_collection_of_records
show_should_return_valid_record
show_should_fail_when_id_not_exists
store_should_save_in_database
store_should_respond_with_201_and_location_when_successful
update_should_only_change_fillable_fields
update_should_fail_with_invalid_id
destroy_should_remove_a_valid_id
destroy_should_return_404_with_invalid_id
ControllerValidation
it_validates_required_fields_on_creating
it_validates_required_fields_on_updating
store_fails_when_{field}_is_{validation}
update_fails_when_{field}_is_{validation}
Trasnformer
it_can_be_initialized
it_transform_a_model
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment