mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Add authentication via GitHub
This commit is contained in:
19
test/integration/translator_flow_test.rb
Normal file
19
test/integration/translator_flow_test.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
require 'test_helper'
|
||||
|
||||
class TranslatorFlowTest < ActionDispatch::IntegrationTest
|
||||
test "can view a problem" do
|
||||
get '/problems/1'
|
||||
assert_response :success
|
||||
assert_select "h1", "First title Problem 1"
|
||||
end
|
||||
|
||||
test "can login via github" do
|
||||
get '/users/auth/github'
|
||||
assert_response :redirect
|
||||
follow_redirect!
|
||||
follow_redirect!
|
||||
assert_response :success
|
||||
assert controller.user_signed_in?
|
||||
assert_equal "translator", controller.current_user.name
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user