Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emergency Bug Fix: Fixed order dependent CSRF spec. #444

Merged
merged 2 commits into from
Dec 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion spec/amber/router/pipe/csrf_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module Amber
module Pipe
describe CSRF do
Dir.cd CURRENT_DIR
Amber.env = :test

context "when requests have HTTP methods" do
CSRF::CHECK_METHODS.each do |method|
Expand Down Expand Up @@ -60,7 +61,6 @@ module Amber

context "across requests" do
it "is valid across request" do
csrf = CSRF.new
request = HTTP::Request.new("GET", "/")
context = create_context(request)

Expand Down
1 change: 1 addition & 0 deletions spec/amber/router/session_spec.cr
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require "../../../spec_helper"
include SessionHelper

module Amber::Router
Amber.settings.redis_url = ENV["REDIS_URL"] if ENV["REDIS_URL"]?
describe Session::Store do
it "creates a cookie session store" do
session = create_session_config("signed_cookie")
Expand Down
2 changes: 1 addition & 1 deletion spec/spec_helper.cr
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ CURRENT_DIR = Dir.current

Amber.environment_path = "./spec/support/config"
Amber.env=(ENV[Amber::AMBER_ENV])
Amber.settings.redis_url = ENV["REDIS_URL"]? || Amber.settings.redis_url
Amber.settings.redis_url = ENV["REDIS_URL"] if ENV["REDIS_URL"]?
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍


require "http"
require "spec"
Expand Down