cirandas.net

ref: master

plugins/site_tour/test/unit/site_tour_helper_test.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
require 'test_helper'

class SiteTourHelperTest < ActionView::TestCase

  include SiteTourPlugin::SiteTourHelper

  should 'parse tooltip description' do
    assert_equal 'test', parse_tour_description("test")
  end

  should 'replace profile attributes in tooltip description' do
    profile = fast_create(Profile)
    expects(:profile).returns(profile).at_least_once
    assert_equal "name #{profile.name}, identifier #{profile.identifier}, url #{url_for profile.url}", parse_tour_description("name {profile.name}, identifier {profile.identifier}, url {profile.url}")
  end

end