From dca118d84b2a328d191ca941111ca4b5db628ce4 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Thu, 2 Jan 2014 04:37:28 +0000 Subject: [PATCH] Added test to list features alphabetically --- test/functional/features_controller_test.rb | 7 +++++++ 1 file changed, 7 insertions(+), 0 deletions(-) diff --git a/test/functional/features_controller_test.rb b/test/functional/features_controller_test.rb index ad7bb8f..6c56915 100644 --- a/test/functional/features_controller_test.rb +++ b/test/functional/features_controller_test.rb @@ -31,6 +31,13 @@ class FeaturesControllerTest < ActionController::TestCase end end + should 'list features alphabetically' do + uses_host 'anhetegua.net' + Environment.expects(:available_features).returns({"c_feature" => "Starting with C", "a_feature" => "Starting with A", "b_feature" => "Starting with B"}).at_least_once + get :index + assert_equal [['a_feature', 'Starting with A'], ['b_feature', 'Starting with B'], ['c_feature', 'Starting with C']], assigns(:features) + end + def test_updates_enabled_features uses_host 'anhetegua.net' post :update, :environment => { :enabled_features => [ 'feature1', 'feature2' ] } -- libgit2 0.21.2