Class: ViewHelpersTest

Inherits:
ActionController::TestCase
  • Object
show all
Defined in:
vendor/plugins/engines/test/functional/view_helpers_test.rb

Instance Method Summary

Instance Method Details

- (Object) setup



6
7
8
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 6

def setup
  get :index
end

- (Object) test_plugin_image_helpers



24
25
26
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 24

def test_plugin_image_helpers
  assert_select "img[src='/plugin_assets/test_assets/images/image.png'][alt='Image']"
end

- (Object) test_plugin_image_submit_helpers



33
34
35
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 33

def test_plugin_image_submit_helpers
  assert_select "input[src='/plugin_assets/test_assets/images/image.png'][type='image']"
end

- (Object) test_plugin_javascript_helpers



10
11
12
13
14
15
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 10

def test_plugin_javascript_helpers
  base_selector = "script[type='text/javascript']"
  js_dir = "/plugin_assets/test_assets/javascripts"
  assert_select "#{base_selector}[src='#{js_dir}/file.1.js']"
  assert_select "#{base_selector}[src='#{js_dir}/file2.js']"
end

- (Object) test_plugin_layouts



28
29
30
31
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 28

def test_plugin_layouts
  get :index
  assert_select "div[id='assets_layout']"
end

- (Object) test_plugin_stylesheet_helpers



17
18
19
20
21
22
# File 'vendor/plugins/engines/test/functional/view_helpers_test.rb', line 17

def test_plugin_stylesheet_helpers
  base_selector = "link[media='screen'][rel='stylesheet'][type='text/css']"
  css_dir = "/plugin_assets/test_assets/stylesheets"
  assert_select "#{base_selector}[href='#{css_dir}/file.1.css']"
  assert_select "#{base_selector}[href='#{css_dir}/file2.css']"
end