Skip to content

Commit

Permalink
Only use the component that can be disabled to test
Browse files Browse the repository at this point in the history
* The first component can be random depends on the order of the loading
  • Loading branch information
allenwq authored and fonglh committed Jun 7, 2017
1 parent 544463c commit 2b176f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/components/course/controller_component_host_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ def initialize(*)
end

context 'with preferences' do
let(:sample_component) { default_enabled_components.first }
let(:sample_component) { default_enabled_components.select(&:can_be_disabled?).first }
context 'disable a component in course' do
before { course.settings(sample_component.key).enabled = false }

Expand Down

0 comments on commit 2b176f6

Please sign in to comment.