Last active
April 6, 2018 15:04
-
-
Save msarit/a1747135d32f24853e9518b194fdc1ca to your computer and use it in GitHub Desktop.
grams#edit action
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe "grams#edit action" do | |
it "shouldn't let a user who did not create the gram edit a gram" do | |
gram = FactoryBot.create(:gram) | |
user = FactoryBot.create(:user) | |
sign_in user | |
get :edit, params: { id: gram.id } | |
expect(response).to have_http_status(:forbidden) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment