Sha256: 7451635ac223c11be64e1faee67866a54eac19ec833cbcdf15c8ad9f08a608a2

Contents?: true

Size: 668 Bytes

Versions: 3

Compression:

Stored size: 668 Bytes

Contents

require "spec_helper"

describe "flag rollouts" do
  let(:user) { User.create }
  let(:feature) { Detour::Feature.create(name: "foo") }

  describe "creating a flag rollout" do
    before do
      Detour::Feature.add_record_to_feature user, feature.name
    end

    it "sets the feature on the user" do
      feature.match_id?(user).should be_true
    end
  end

  describe "removing a flag rollout" do
    before do
      Detour::Feature.add_record_to_feature user, feature.name
      Detour::Feature.remove_record_from_feature user, feature.name
    end

    it "removes the feature from the user" do
      feature.match_id?(user).should be_false
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
detour-0.0.3 spec/integration/flag_rollout_spec.rb
detour-0.0.2 spec/integration/flag_rollout_spec.rb
detour-0.0.1 spec/integration/flag_rollout_spec.rb