Skip to content

Instantly share code, notes, and snippets.

@chrickso
Created April 21, 2018 22:04
Show Gist options
  • Save chrickso/efec3b17f439e5b496a4f4bcfdc311ec to your computer and use it in GitHub Desktop.
Save chrickso/efec3b17f439e5b496a4f4bcfdc311ec to your computer and use it in GitHub Desktop.
test "SHOULD create note AND redirect to Notes#index(SINCE null folder_id) WHEN only body is provided IF logged in as account:owner" do
sign_in @user
assert_difference('@user.account.notes.count') do
post notes_url(@user.account.hash_id), params: { note: { body: @note_by_user_no_folder.body } }
end
assert_redirected_to notes_url(@user.account.hash_id, anchor: Note.last.id)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment