diff --git a/test/functional/themes_controller_test.rb b/test/functional/themes_controller_test.rb index 6574fd1..82934b4 100644 --- a/test/functional/themes_controller_test.rb +++ b/test/functional/themes_controller_test.rb @@ -308,4 +308,14 @@ class ThemesControllerTest < ActionController::TestCase assert_no_tag :content => "Select theme" end + should 'not duplicate themes that are included by the user and by the environment' do + t1 = Theme.create('theme1') + t2 = Theme.create('theme2') + Environment.any_instance.stubs('themes').returns([t1,t2]) + Theme.stubs(:approved_themes).returns([t2]) + + get :index, :profile => "testinguser" + assert_equivalent [t1, t2], assigns(:themes) + end + end -- libgit2 0.21.2