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.94.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.13 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.12 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.11 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.10 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.9 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.8 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.7 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.6 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.5 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.4 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.3 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.2 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.93.0 mod/standard/spec/set/type/toggle_spec.rb
card-1.92.2 mod/standard/spec/set/type/toggle_spec.rb
card-1.92.1 mod/standard/spec/set/type/toggle_spec.rb
card-1.92 mod/standard/spec/set/type/toggle_spec.rb
card-1.91 mod/standard/spec/set/type/toggle_spec.rb
card-1.21.0 mod/standard/spec/set/type/toggle_spec.rb