Commit 781ee37c28bf1137df0574e29de710490588eb43
1 parent
a24f068a
Exists in
master
and in
22 other branches
themes-controller-test: test themes are not duplicated when allowed by the envir…
…onment and by the user
Showing
1 changed file
with
10 additions
and
0 deletions
Show diff stats
test/functional/themes_controller_test.rb
... | ... | @@ -308,4 +308,14 @@ class ThemesControllerTest < ActionController::TestCase |
308 | 308 | assert_no_tag :content => "Select theme" |
309 | 309 | end |
310 | 310 | |
311 | + should 'not duplicate themes that are included by the user and by the environment' do | |
312 | + t1 = Theme.create('theme1') | |
313 | + t2 = Theme.create('theme2') | |
314 | + Environment.any_instance.stubs('themes').returns([t1,t2]) | |
315 | + Theme.stubs(:approved_themes).returns([t2]) | |
316 | + | |
317 | + get :index, :profile => "testinguser" | |
318 | + assert_equivalent [t1, t2], assigns(:themes) | |
319 | + end | |
320 | + | |
311 | 321 | end | ... | ... |