Not all project features tested in specs for "enabled for everyone" & "disabled/enabled by feature flag"
The following discussion from !30430 (merged) should be addressed:
-
@ifarkas started a discussion: (+4 comments) Should we check it on all
feature.to_sym
?
There might exist an earlier issue here, since I noticed and corrected a bunch of these each
specs.
I have just now tested this with the changes below and it failed at the pages
feature:
context 'when feature is enabled for everyone' do
it "returns true" do
features.each do |feature|
expect(project.feature_available?(feature.to_sym, user)).to eq(true), "#{feature} failed"
end
end
end
context 'when feature is disabled by a feature flag' do
it 'returns false' do
features.each do |feature|
stub_feature_flags(feature.to_sym => false)
expect(project.feature_available?(feature.to_sym, user)).to eq(false), "#{feature} failed"
end
end
end
context 'when feature is enabled by a feature flag' do
it 'returns true' do
features.each do |feature|
stub_feature_flags(feature.to_sym => true)
expect(project.feature_available?(feature.to_sym, user)).to eq(true), "#{feature} failed"
end
end
end
Seems this is unrelated to admin mode?
/cc @reprazent @ifarkas
Edited by Diego Louzán