Sha256: 2806297a3f23fbd5c790b83dd60fffc4dae06e1e57e5f934a84f33604b1b85ea
Contents?: true
Size: 961 Bytes
Versions: 6
Compression:
Stored size: 961 Bytes
Contents
require File.expand_path("../../test_helper", __FILE__) describe "Flipflop::StrategiesController" do before do @app = TestApp.new end after do @app.unload! end subject do Flipflop::StrategiesController.new end describe "enable?" do it "should return false when commit is empty" do subject.params = ActionController::Parameters.new(commit: "") assert_same subject.send(:enable?), false end it "should return false when commit is nil" do subject.params = ActionController::Parameters.new assert_same subject.send(:enable?), false end it "should return true when commit is on" do subject.params = ActionController::Parameters.new(commit: "on") assert_same subject.send(:enable?), true end it "should return true when commit is 1" do subject.params = ActionController::Parameters.new(commit: "1") assert_same subject.send(:enable?), true end end end
Version data entries
6 entries across 6 versions & 1 rubygems