Sha256: 28759d2318b6a03d4413bcc49683a48084c52a6f551c0728b86fc372c3873095

Contents?: true

Size: 834 Bytes

Versions: 23

Compression:

Stored size: 834 Bytes

Contents

require 'spec_helper'
require_relative '../../../app/helpers/riveter/query_filter_form_helper'

describe Riveter::QueryFilterFormHelper do
  subject {
    Class.new().tap do |klass|
      klass.send :include, Riveter::QueryFilterFormHelper
    end.new()
  }

  describe "#query_filter_form_for" do
    it "delegates to default form_for" do
      query_filter = TestQueryFilter.new()
      expect(subject).to receive(:form_for).with(query_filter, :as => 'test', :url => 'test', :method => :get)

      subject.query_filter_form_for(query_filter)
    end

    it "delegates to simple form if available" do
      query_filter = TestQueryFilter.new()
      expect(subject).to receive(:simple_form_for).with(query_filter, :as => 'test', :url => 'test', :method => :get)

      subject.query_filter_form_for(query_filter)
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
riveter-0.8.3 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.8.2 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.8.1 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.8.0 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.7.0 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.6.0 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.3.0 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.2.1 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.2.0 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.1.1 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.15 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.14 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.13 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.12 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.11 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.10 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.9 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.8 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.7 spec/helpers/riveter/query_filter_form_helper_spec.rb
riveter-0.0.6 spec/helpers/riveter/query_filter_form_helper_spec.rb