aboutsummaryrefslogtreecommitdiffstats
path: root/spec/support/artifice/compact_index_creds_diff_host.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/support/artifice/compact_index_creds_diff_host.rb')
-rw-r--r--spec/support/artifice/compact_index_creds_diff_host.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/spec/support/artifice/compact_index_creds_diff_host.rb b/spec/support/artifice/compact_index_creds_diff_host.rb
index 6a56c508..2e8cd46b 100644
--- a/spec/support/artifice/compact_index_creds_diff_host.rb
+++ b/spec/support/artifice/compact_index_creds_diff_host.rb
@@ -13,10 +13,9 @@ class CompactIndexCredsDiffHost < CompactIndexAPI
end
def protected!
- unless authorized?
- response["WWW-Authenticate"] = %(Basic realm="Testing HTTP Auth")
- throw(:halt, [401, "Not authorized\n"])
- end
+ return if authorized?
+ response["WWW-Authenticate"] = %(Basic realm="Testing HTTP Auth")
+ throw(:halt, [401, "Not authorized\n"])
end
end