Created
April 6, 2018 15:19
-
-
Save msarit/c300b06853a39425c21015cb48249e16 to your computer and use it in GitHub Desktop.
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) | |
diff_user = FactoryBot.create(:user) | |
sign_in diff_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