From 20bbac427ab2aea423d3f377c4319687520475a4 Mon Sep 17 00:00:00 2001 From: JB Vasseur Date: Thu, 11 Oct 2018 23:32:44 +0900 Subject: [PATCH] Hit the database --- spec/requests/api/applications_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/requests/api/applications_spec.rb b/spec/requests/api/applications_spec.rb index 9240dd94990..77b4c5ecbba 100644 --- a/spec/requests/api/applications_spec.rb +++ b/spec/requests/api/applications_spec.rb @@ -5,7 +5,7 @@ describe API::Applications, :api do let(:admin_user) { create(:user, admin: true) } let(:user) { create(:user, admin: false) } - let(:application) { create(:application, name: 'application_name', redirect_uri: 'http://application.url', scopes: '') } + let!(:application) { create(:application, name: 'application_name', redirect_uri: 'http://application.url', scopes: '') } describe 'POST /applications' do context 'authenticated and authorized user' do @@ -107,7 +107,7 @@ describe API::Applications, :api do it 'cannot list application' do get api('/applications', user) - expect(response).to have_http_status 401 + expect(response).to have_http_status 403 end end end