Merge pull request #4853 from Matt-Yorkley/3-0-base-controller

[Spree 2.1] Fix headers in api/base_controller spec
This commit is contained in:
Luis Ramos
2020-02-28 11:21:16 +00:00
committed by GitHub

View File

@@ -35,7 +35,7 @@ describe Api::BaseController do
context "cannot make a request to the API" do
it "with an invalid API key" do
request.env["X-Spree-Token"] = "fake_key"
request.headers["X-Spree-Token"] = "fake_key"
get :index, {}
expect(json_response).to eq( "error" => "Invalid API key (fake_key) specified." )
expect(response.status).to eq(401)