Sha256: 7fc45da6ad384eae08bf26de39153d3dcccf7563f4ed347fe4a69ec2a21d43fe

Contents?: true

Size: 849 Bytes

Versions: 1

Compression:

Stored size: 849 Bytes

Contents

require 'test_helper'

class BootstrapFormBuilder::HelpersTest < ActionView::TestCase
  test '#bootstrap_form_for calls form_for with a builder option' do
    view.expects(:form_for).with(anything, has_entry(:builder, BootstrapFormBuilder::FormBuilder))
    view.bootstrap_form_for(stub_everything) {}
  end

  test '#bootstrap_form_for passes other options through to form_for' do
    view.expects(:form_for).with(anything, has_entries(builder: BootstrapFormBuilder::FormBuilder, method: :put, html: {multipart: true}))
    view.bootstrap_form_for(stub_everything, method: :put, html: {multipart: true}) {}
  end

  test '#bootstrap_fields_for calls fields_for with a builder option' do
    view.expects(:fields_for).with(anything, has_entry(:builder, BootstrapFormBuilder::FormBuilder))
    view.bootstrap_fields_for(stub_everything) {}
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bootstrap_form_builder-0.0.1 test/bootstrap_form_builder/helpers_test.rb