Sha256: c87224293885969062082240ef0490fb7df924faf72316932a253635a6701206

Contents?: true

Size: 661 Bytes

Versions: 16

Compression:

Stored size: 661 Bytes

Contents

require 'helper'

RSpec.describe Flipper::Api::V1::Actions::ClearFeature do
  let(:app) { build_api(flipper) }

  describe 'clear' do
    before do
      Flipper.register(:admins) {}
      actor22 = Flipper::Actor.new('22')

      feature = flipper[:my_feature]
      feature.enable flipper.boolean
      feature.enable flipper.group(:admins)
      feature.enable flipper.actor(actor22)
      feature.enable flipper.actors(25)
      feature.enable flipper.time(45)

      delete '/features/my_feature/clear'
    end

    it 'clears feature' do
      expect(last_response.status).to eq(204)
      expect(flipper[:my_feature].off?).to be_truthy
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
flipper-api-0.15.0 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.14.0 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.13.0 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.13.0.beta1 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.12.2 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.12.1 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.12.0 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.rc1 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta9 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta8 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta7 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta6 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta5 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta4 spec/flipper/api/v1/actions/clear_feature_spec.rb
flipper-api-0.11.0.beta3 spec/flipper/api/v1/actions/clear_feature_spec.rb