Sha256: 35e9d39455e06d47ecaf49ab946c640fa168eb3e330f95111d04306f9714de52

Contents?: true

Size: 660 Bytes

Versions: 40

Compression:

Stored size: 660 Bytes

Contents

# -*- encoding : utf-8 -*-

describe Card::Set::Type::Toggle do
  it "has special editor" do
    assert_view_select render_editor("Toggle"), 'input[type="checkbox"]'
  end

  it "has yes/no as processed content" do
    expect(render_view(:core, type: "Toggle", content: "0")).to eq("no")
    expect(render_view(:closed_content, type: "Toggle", content: "1"))
      .to eq("yes")
  end

  describe "view :labeled_editor" do
    subject { render_view :labeled_editor, type: :toggle, name: "A+toggle" }

    it "has checkbox label" do
      is_expected.to have_tag("label", with: { for: "card_content" }) do
        with_text "toggle"
      end
    end
  end
end

Version data entries

40 entries across 40 versions & 1 rubygems

Version Path
card-1.98.3 mod/standard/spec/set/type/toggle_spec.rb
card-1.98.2 mod/standard/spec/set/type/toggle_spec.rb
card-1.98.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.98.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.97.0.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.97.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.8 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.7 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.6 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.5 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.4 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.3 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.2 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.96.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.95.3 mod/standard/spec/set/type/toggle_spec.rb
card-1.95.2 mod/standard/spec/set/type/toggle_spec.rb
card-1.95.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.95.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.94.1 mod/standard/spec/set/type/toggle_spec.rb