Commit a85df0f60678af5c58569007331aa95a2ef7c7ba
1 parent
b40cea44
Exists in
master
and in
28 other branches
Fixing tests
Showing
1 changed file
with
7 additions
and
3 deletions
Show diff stats
test/unit/thickbox_helper_test.rb
| ... | ... | @@ -3,14 +3,18 @@ require File.dirname(__FILE__) + '/../test_helper' |
| 3 | 3 | class ThickboxHelperTest < Test::Unit::TestCase |
| 4 | 4 | include ThickboxHelper |
| 5 | 5 | |
| 6 | + def url_for(url) | |
| 7 | + url | |
| 8 | + end | |
| 9 | + | |
| 6 | 10 | should 'create thickbox links correcly' do |
| 7 | - expects(:link_to).with('Title', '#TB_inline?height=300&width=500&inlineId=inlineLoginBox&modal=true', :class => 'thickbox') | |
| 8 | - thickbox_inline_popup_link('Title', 'inlineLoginBox') | |
| 11 | + expects(:link_to).with('Title', '/url#TB_inline?height=300&width=500&inlineId=inlineLoginBox&modal=true', :class => 'thickbox') | |
| 12 | + thickbox_inline_popup_link('Title', '/url', 'inlineLoginBox') | |
| 9 | 13 | end |
| 10 | 14 | |
| 11 | 15 | should 'pass along extra options' do |
| 12 | 16 | expects(:link_to).with('Title', anything, :class => 'thickbox', :id => 'lalala', :title => 'lelele') |
| 13 | - thickbox_inline_popup_link('Title', 'inlineLoginBox', :id => 'lalala', :title => 'lelele') | |
| 17 | + thickbox_inline_popup_link('Title', '/url', 'inlineLoginBox', :id => 'lalala', :title => 'lelele') | |
| 14 | 18 | end |
| 15 | 19 | |
| 16 | 20 | should 'generate close button' do | ... | ... |