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,8 +13,14 @@ class Theme | ||
13 | Rails.root.join('public', 'user_themes') | 13 | Rails.root.join('public', 'user_themes') |
14 | end | 14 | end |
15 | 15 | ||
16 | + #FIXME make this test | ||
16 | def system_themes_dir | 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 | end | 24 | end |
19 | 25 | ||
20 | def create(id, attributes = {}) | 26 | def create(id, attributes = {}) |
@@ -94,6 +100,11 @@ class Theme | @@ -94,6 +100,11 @@ class Theme | ||
94 | end | 100 | end |
95 | 101 | ||
96 | #FIXME make this test | 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 | def filesystem_path | 108 | def filesystem_path |
98 | File.join(self.class.system_themes_dir, self.id) | 109 | File.join(self.class.system_themes_dir, self.id) |
99 | end | 110 | end |
test/unit/box_organizer_helper_test.rb
@@ -10,10 +10,6 @@ class BoxOrganizerHelperTest < ActionView::TestCase | @@ -10,10 +10,6 @@ class BoxOrganizerHelperTest < ActionView::TestCase | ||
10 | 10 | ||
11 | attr_reader :environment | 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 | should 'display the default icon for block without icon' do | 13 | should 'display the default icon for block without icon' do |
18 | class SomeBlock < Block; end | 14 | class SomeBlock < Block; end |
19 | block = SomeBlock | 15 | block = SomeBlock |