|
332 | 332 | subject(:post_slo_response) { post "/auth/saml/slo", params, opts } |
333 | 333 |
|
334 | 334 | context "when relay state is relative" do |
335 | | - let(:params) {super().merge(RelayState: "/signed-out")} |
| 335 | + let(:params) { super().merge(RelayState: "/signed-out") } |
336 | 336 |
|
337 | 337 | it "redirects to the relaystate" do |
338 | 338 | post_slo_response |
|
343 | 343 | end |
344 | 344 |
|
345 | 345 | context "when relay state is an absolute https URL" do |
346 | | - let(:params) {super().merge(RelayState: "https://example.com/")} |
| 346 | + let(:params) { super().merge(RelayState: "https://example.com/") } |
347 | 347 |
|
348 | 348 | it "redirects without a location header" do |
349 | 349 | post_slo_response |
|
357 | 357 | let(:saml_options) { super().merge(slo_default_relay_state: '/signed-out') } |
358 | 358 |
|
359 | 359 | context "when response relay state is valid" do |
360 | | - let(:params) {super().merge(RelayState: "/safe/logout")} |
| 360 | + let(:params) { super().merge(RelayState: "/safe/logout") } |
361 | 361 |
|
362 | | - it {is_expected.to be_redirect.and have_attributes(location: '/safe/logout') } |
| 362 | + it { is_expected.to be_redirect.and have_attributes(location: '/safe/logout') } |
363 | 363 | end |
364 | 364 |
|
365 | 365 | context "when response relay state is invalid" do |
366 | | - let(:params) {super().merge(RelayState: "javascript:alert(1)")} |
| 366 | + let(:params) { super().merge(RelayState: "javascript:alert(1)") } |
367 | 367 |
|
368 | | - it {is_expected.to be_redirect.and have_attributes(location: '/signed-out') } |
| 368 | + it { is_expected.to be_redirect.and have_attributes(location: '/signed-out') } |
369 | 369 | end |
370 | 370 | end |
371 | 371 |
|
372 | 372 | context 'when slo_default_relay_state is blank' do |
373 | 373 | let(:saml_options) { super().merge(slo_default_relay_state: nil) } |
374 | 374 |
|
375 | 375 | context "when response relay state is valid" do |
376 | | - let(:params) {super().merge(RelayState: "/safe/logout")} |
| 376 | + let(:params) { super().merge(RelayState: "/safe/logout") } |
377 | 377 |
|
378 | | - it {is_expected.to be_redirect.and have_attributes(location: '/safe/logout') } |
| 378 | + it { is_expected.to be_redirect.and have_attributes(location: '/safe/logout') } |
379 | 379 | end |
380 | 380 |
|
381 | 381 | context "when response relay state is invalid" do |
382 | | - let(:params) {super().merge(RelayState: "javascript:alert(1)")} |
| 382 | + let(:params) { super().merge(RelayState: "javascript:alert(1)") } |
383 | 383 |
|
384 | | - it {is_expected.to be_redirect.and have_attributes(location: nil) } |
| 384 | + it { is_expected.to be_redirect.and have_attributes(location: nil) } |
385 | 385 | end |
386 | 386 | end |
387 | 387 | end |
|
0 commit comments