Commit d981abf59842449431af067657b25a84a88d89d6
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'AI3279-new_block_store' into stable
Conflicts: test/unit/box_organizer_helper_test.rb
Showing
2 changed files
with
12 additions
and
5 deletions
Show diff stats
app/models/theme.rb
| ... | ... | @@ -13,8 +13,14 @@ class Theme |
| 13 | 13 | Rails.root.join('public', 'user_themes') |
| 14 | 14 | end |
| 15 | 15 | |
| 16 | + #FIXME make this test | |
| 16 | 17 | def system_themes_dir |
| 17 | - Rails.root.join('public', 'designs', 'themes') | |
| 18 | + Rails.root.join('public', relative_themes_dir) | |
| 19 | + end | |
| 20 | + | |
| 21 | + #FIXME make this test | |
| 22 | + def relative_themes_dir | |
| 23 | + File.join('designs', 'themes') | |
| 18 | 24 | end |
| 19 | 25 | |
| 20 | 26 | def create(id, attributes = {}) |
| ... | ... | @@ -94,6 +100,11 @@ class Theme |
| 94 | 100 | end |
| 95 | 101 | |
| 96 | 102 | #FIXME make this test |
| 103 | + def public_path | |
| 104 | + File.join('/', self.class.relative_themes_dir, self.id) | |
| 105 | + end | |
| 106 | + | |
| 107 | + #FIXME make this test | |
| 97 | 108 | def filesystem_path |
| 98 | 109 | File.join(self.class.system_themes_dir, self.id) |
| 99 | 110 | end | ... | ... |
test/unit/box_organizer_helper_test.rb
| ... | ... | @@ -10,10 +10,6 @@ class BoxOrganizerHelperTest < ActionView::TestCase |
| 10 | 10 | |
| 11 | 11 | attr_reader :environment |
| 12 | 12 | |
| 13 | - should 'max number of blocks be 7' do | |
| 14 | - assert_equal 7, max_number_of_blocks_per_line | |
| 15 | - end | |
| 16 | - | |
| 17 | 13 | should 'display the default icon for block without icon' do |
| 18 | 14 | class SomeBlock < Block; end |
| 19 | 15 | block = SomeBlock | ... | ... |