Commit e2feaba3c19d38a977898fe3c7367361bddb06eb
1 parent
30f970d2
Exists in
master
and in
29 other branches
Fixes test after spread button change to modal api
Fixes test broken after changing spread button to use modal api. Also removes colorbox class that I forgot to remove in previous commit, since now we are using modal api. For reference see commit: edcc13059b31341eb78e58079ac2322f1142f206
Showing
3 changed files
with
3 additions
and
3 deletions
Show diff stats
app/helpers/cms_helper.rb
... | ... | @@ -30,7 +30,7 @@ module CmsHelper |
30 | 30 | end |
31 | 31 | |
32 | 32 | def display_spread_button(article) |
33 | - expirable_button article, :spread, _('Spread this'), {:action => 'publish', :id => article.id}, {:class => 'colorbox', :modal => true} | |
33 | + expirable_button article, :spread, _('Spread this'), {:action => 'publish', :id => article.id}, {:modal => true} | |
34 | 34 | end |
35 | 35 | |
36 | 36 | def display_delete_button(article) | ... | ... |
app/views/content_viewer/_article_toolbar.html.erb
... | ... | @@ -18,7 +18,7 @@ |
18 | 18 | |
19 | 19 | <% if @page.allow_spread?(user) && !remove_content_button(:spread, @page) %> |
20 | 20 | <% url = profile.admin_url.merge({ :controller => 'cms', :action => 'publish', :id => @page.id }) %> |
21 | - <%= expirable_button @page, :spread, content_tag( 'span', _('Spread this') ), url, {:class => 'colorbox', :modal => true} if url %> | |
21 | + <%= expirable_button @page, :spread, content_tag( 'span', _('Spread this') ), url, {:modal => true} if url %> | |
22 | 22 | <% end %> |
23 | 23 | |
24 | 24 | <% if !@page.gallery? && (@page.allow_create?(user) || (@page.parent && @page.parent.allow_create?(user))) %> | ... | ... |
test/unit/cms_helper_test.rb
... | ... | @@ -52,7 +52,7 @@ class CmsHelperTest < ActionView::TestCase |
52 | 52 | plugins.stubs(:dispatch).returns([]) |
53 | 53 | profile = fast_create(Person) |
54 | 54 | article = fast_create(TinyMceArticle, :name => 'My article', :profile_id => profile.id) |
55 | - expects(:link_to).with('Spread this', {:action => 'publish', :id => article.id}, :class => 'button with-text icon-spread colorbox', :title => nil) | |
55 | + expects(:link_to).with('Spread this', {:action => 'publish', :id => article.id}, :class => 'modal-toggle button with-text icon-spread', :title => nil) | |
56 | 56 | |
57 | 57 | result = display_spread_button(article) |
58 | 58 | end | ... | ... |