spec/rollout_spec.rb in rollout-2.4.6 vs spec/rollout_spec.rb in rollout-2.5.0
- old
+ new
@@ -427,11 +427,12 @@
expect(feature.percentage).to eq 10
expect(feature.users).to eq %w(42)
expect(feature.to_hash).to eq(
groups: [:caretakers, :greeters],
percentage: 10,
- users: %w(42)
+ users: %w(42),
+ data: {},
)
feature = @rollout.get(:signup)
expect(feature.groups).to be_empty
expect(feature.users).to be_empty
@@ -447,11 +448,12 @@
expect(feature.percentage).to eq 10
expect(feature.users).to eq %w(42).to_set
expect(feature.to_hash).to eq(
groups: [:caretakers, :greeters].to_set,
percentage: 10,
- users: %w(42).to_set
+ users: %w(42).to_set,
+ data: {},
)
feature = @rollout.get(:signup)
expect(feature.groups).to be_empty
expect(feature.users).to be_empty
@@ -471,11 +473,12 @@
it "each feature is cleared" do
features.each do |feature|
expect(@rollout.get(feature).to_hash).to eq(
percentage: 0,
users: [],
- groups: []
+ groups: [],
+ data: {},
)
end
end
it "each feature is cleared with sets" do
@@ -483,10 +486,11 @@
@options[:use_sets] = true
features.each do |feature|
expect(@rollout.get(feature).to_hash).to eq(
percentage: 0,
users: Set.new,
- groups: Set.new
+ groups: Set.new,
+ data: {},
)
end
end
it "removes all features" do