Skip to content

Instantly share code, notes, and snippets.

@stevepentler
Last active March 28, 2016 14:18
Show Gist options
  • Save stevepentler/ff3bf4a4d609e3d2df0d to your computer and use it in GitHub Desktop.
Save stevepentler/ff3bf4a4d609e3d2df0d to your computer and use it in GitHub Desktop.
- see test_helper ActionController::TestCase for JSON.parse refactoring
- Need to reload the idea on an update ex: ideas(:one).reload before assertions
- see the idea.rb for validating inclusions
- head :no_content in delete action on ideas_controller?
- include Rails.application.routes.url_helper in integration tests?
- Does declaring vars at the top of a file give them global scope? Or is it for readability?
- event.preventDefault(); ?
- see the hassles of asynchronous code and multiple threats (complicated testing)
- IdeaRepository.all - is this Lo-Dash?
Edits:
test "controller responds to json" do
id = ideas(:one).id
get :show, id: id, format: :json
assert_response :success
end
already have a test by this name in the same file, need to rename test
_____________________________
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment