Sha256: 64de1a964561d42339c96d1aada5110f76b64848aa84b998baf048a1c4c1f0ba

Contents?: true

Size: 760 Bytes

Versions: 1

Compression:

Stored size: 760 Bytes

Contents

require 'helper'

describe OmniAuth::Form do
  describe ".build" do
    it "yields the instance when called with a block and argument" do
      OmniAuth::Form.build{|f| expect(f).to be_kind_of(OmniAuth::Form)}
    end

    it "evaluates in the instance when called with a block and no argument" do
      OmniAuth::Form.build{|f| expect(f.class).to eq(OmniAuth::Form)}
    end
  end

  describe "#initialize" do
    it "sets the form action to the passed :url option" do
      expect(OmniAuth::Form.new(:url => '/awesome').to_html).to be_include("action='/awesome'")
    end

    it "sets an H1 tag from the passed :title option" do
      expect(OmniAuth::Form.new(:title => 'Something Cool').to_html).to be_include('<h1>Something Cool</h1>')
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-1.1.4 spec/omniauth/form_spec.rb