|
69 | 69 | describe "login flow" do |
70 | 70 | before do |
71 | 71 | post "/auth/identity/register", |
72 | | - { |
73 | | - name: "Login Test", |
74 | | - email: "login@example.com", |
75 | | - password: "test_password_123", |
76 | | - password_confirmation: "test_password_123", |
77 | | - }, |
78 | | - {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
| 72 | + { |
| 73 | + name: "Login Test", |
| 74 | + email: "login@example.com", |
| 75 | + password: "test_password_123", |
| 76 | + password_confirmation: "test_password_123", |
| 77 | + }, |
| 78 | + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
79 | 79 | end |
80 | 80 |
|
81 | 81 | it "authenticates with valid credentials", :check_output do |
82 | 82 | post "/auth/identity/callback", |
83 | | - { |
84 | | - auth_key: "login@example.com", |
85 | | - password: "test_password_123", |
86 | | - }, |
87 | | - {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
| 83 | + { |
| 84 | + auth_key: "login@example.com", |
| 85 | + password: "test_password_123", |
| 86 | + }, |
| 87 | + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
88 | 88 |
|
89 | 89 | # $stderr.puts "=== REGISTRATION RESPONSE ===" |
90 | 90 | # $stderr.puts "Status: #{last_response.status}" |
|
100 | 100 |
|
101 | 101 | it "rejects invalid password", :check_output do |
102 | 102 | post "/auth/identity/callback", |
103 | | - { |
104 | | - auth_key: "login@example.com", |
105 | | - password: "wrong_password", |
106 | | - }, |
107 | | - {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
| 103 | + { |
| 104 | + auth_key: "login@example.com", |
| 105 | + password: "wrong_password", |
| 106 | + }, |
| 107 | + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
108 | 108 |
|
109 | 109 | follow_redirect! |
110 | 110 | expect(last_response.status).to be >= 400 |
111 | 111 | end |
112 | 112 |
|
113 | 113 | it "rejects non-existent user", :check_output do |
114 | 114 | post "/auth/identity/callback", |
115 | | - { |
116 | | - auth_key: "nonexistent@example.com", |
117 | | - password: "any_password", |
118 | | - }, |
119 | | - {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
| 115 | + { |
| 116 | + auth_key: "nonexistent@example.com", |
| 117 | + password: "any_password", |
| 118 | + }, |
| 119 | + {"HTTP_HOST" => "example.org", "rack.url_scheme" => "http"} |
120 | 120 |
|
121 | 121 | follow_redirect! |
122 | 122 | expect(last_response.status).to be >= 400 |
|
0 commit comments