Commit dca118d84b2a328d191ca941111ca4b5db628ce4
1 parent
57843514
Exists in
master
and in
23 other branches
Added test to list features alphabetically
(ActionItem2910)
Showing
1 changed file
with
7 additions
and
0 deletions
Show diff stats
test/functional/features_controller_test.rb
| ... | ... | @@ -31,6 +31,13 @@ class FeaturesControllerTest < ActionController::TestCase |
| 31 | 31 | end |
| 32 | 32 | end |
| 33 | 33 | |
| 34 | + should 'list features alphabetically' do | |
| 35 | + uses_host 'anhetegua.net' | |
| 36 | + Environment.expects(:available_features).returns({"c_feature" => "Starting with C", "a_feature" => "Starting with A", "b_feature" => "Starting with B"}).at_least_once | |
| 37 | + get :index | |
| 38 | + assert_equal [['a_feature', 'Starting with A'], ['b_feature', 'Starting with B'], ['c_feature', 'Starting with C']], assigns(:features) | |
| 39 | + end | |
| 40 | + | |
| 34 | 41 | def test_updates_enabled_features |
| 35 | 42 | uses_host 'anhetegua.net' |
| 36 | 43 | post :update, :environment => { :enabled_features => [ 'feature1', 'feature2' ] } | ... | ... |