Skip to content

Commit 831bfa2

Browse files
committed
remove request test authorization helper
1 parent ca5fac0 commit 831bfa2

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

spec/request/request_for_comments_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
RSpec.describe 'POST /request_for_comments/:rfc_id/report', type: :request do
66
before do
7-
login_as(create(:learner))
7+
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
88
codeocean_config = instance_double(CodeOcean::Config)
99
allow(CodeOcean::Config).to receive(:new).with(:code_ocean).and_return(codeocean_config)
1010
allow(codeocean_config).to receive(:read).and_return({

spec/support/authentication.rb

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,6 @@ def sign_in(user, password)
66
end
77
end
88

9-
module RequestLoginHelper
10-
def login_as(user)
11-
allow_any_instance_of(ApplicationController).to receive(:current_user).and_return(user)
12-
end
13-
end
14-
159
RSpec.configure do |config|
1610
config.include Authentication, type: :system
17-
config.include RequestLoginHelper, type: :request
1811
end

0 commit comments

Comments
 (0)