Commit 0dad17a28445562b062e9f927d87b685638da315
1 parent
560b9c49
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Sort blocks by name in block store
Showing
2 changed files
with
7 additions
and
1 deletions
Show diff stats
app/controllers/box_organizer_controller.rb
test/functional/profile_design_controller_test.rb
| ... | ... | @@ -362,6 +362,12 @@ class ProfileDesignControllerTest < ActionController::TestCase |
| 362 | 362 | assert_tag :tag => 'a', :content => 'Back to control panel' |
| 363 | 363 | end |
| 364 | 364 | |
| 365 | + should 'display avaliable blocks in alphabetical order' do | |
| 366 | + @controller.stubs(:available_blocks).returns([TagsBlock, ArticleBlock]) | |
| 367 | + get :index, :profile => 'designtestuser' | |
| 368 | + assert_equal assigns(:available_blocks), [ArticleBlock, TagsBlock] | |
| 369 | + end | |
| 370 | + | |
| 365 | 371 | should 'not allow products block if environment do not let' do |
| 366 | 372 | env = Environment.default |
| 367 | 373 | env.disable('products_for_enterprises') | ... | ... |