spec/flipper/ui/actions/groups_gate_spec.rb in flipper-ui-0.7.2 vs spec/flipper/ui/actions/groups_gate_spec.rb in flipper-ui-0.7.3
- old
+ new
@@ -31,11 +31,11 @@
context "enabling a group" do
before do
post "features/search/groups",
{"value" => "admins", "operation" => "enable", "authenticity_token" => "a"},
- "rack.session" => {:csrf => "a"}
+ "rack.session" => {"_csrf_token" => "a"}
end
it "adds item to members" do
expect(flipper[:search].groups_value).to include("admins")
end
@@ -49,11 +49,11 @@
context "disabling a group" do
before do
flipper[:search].enable_group :admins
post "features/search/groups",
{"value" => "admins", "operation" => "disable", "authenticity_token" => "a"},
- "rack.session" => {:csrf => "a"}
+ "rack.session" => {"_csrf_token" => "a"}
end
it "removes item from members" do
expect(flipper[:search].groups_value).not_to include("admins")
end
@@ -66,10 +66,10 @@
context "for an unregistered group" do
before do
post "features/search/groups",
{"value" => "not_here", "operation" => "enable", "authenticity_token" => "a"},
- "rack.session" => {:csrf => "a"}
+ "rack.session" => {"_csrf_token" => "a"}
end
it "redirects back to feature" do
expect(last_response.status).to be(302)
expect(last_response.headers["Location"]).to eq("/features/search/groups?error=The+group+named+%22not_here%22+has+not+been+registered.")