Commit a8a8780bec85ec80229a4b9781a45444fed29eb8

Authored by Rodrigo Souto
1 parent 781ee37c

themes-controller-test: add test to sort themes

Showing 1 changed file with 9 additions and 0 deletions   Show diff stats
test/functional/themes_controller_test.rb
... ... @@ -318,4 +318,13 @@ class ThemesControllerTest < ActionController::TestCase
318 318 assert_equivalent [t1, t2], assigns(:themes)
319 319 end
320 320  
  321 + should 'sort themes by name' do
  322 + t1 = Theme.create('bill-theme')
  323 + t2 = Theme.create('ana-theme')
  324 + Theme.stubs(:approved_themes).returns([t1,t2])
  325 +
  326 + get :index, :profile => "testinguser"
  327 + assert_equal [t2, t1], assigns(:themes)
  328 + end
  329 +
321 330 end
... ...