Commit a85df0f60678af5c58569007331aa95a2ef7c7ba

Authored by Antonio Terceiro
1 parent b40cea44

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,14 +3,18 @@ require File.dirname(__FILE__) + '/../test_helper'
3 class ThickboxHelperTest < Test::Unit::TestCase 3 class ThickboxHelperTest < Test::Unit::TestCase
4 include ThickboxHelper 4 include ThickboxHelper
5 5
  6 + def url_for(url)
  7 + url
  8 + end
  9 +
6 should 'create thickbox links correcly' do 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 end 13 end
10 14
11 should 'pass along extra options' do 15 should 'pass along extra options' do
12 expects(:link_to).with('Title', anything, :class => 'thickbox', :id => 'lalala', :title => 'lelele') 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 end 18 end
15 19
16 should 'generate close button' do 20 should 'generate close button' do