Sha256: 9979de52ead7a5007394cbd1b895e86b69a7b22ce52a7753c9fefa63fc054396

Contents?: true

Size: 636 Bytes

Versions: 2

Compression:

Stored size: 636 Bytes

Contents

describe "Check Row" do
  before do
    row_settings = {
      title: "Check",
      key: :check,
      type: :check,
    }
    @row = Formotion::Row.new(row_settings)
    @row.reuse_identifier = 'test'
  end

  it "should initialize with correct settings" do
    @row.object.class.should == Formotion::RowType::CheckRow
  end

  # Value
  it "should be unchecked by default" do
    cell = @row.make_cell
    cell.accessoryType.should == UITableViewCellAccessoryNone
  end

  it "should be checked when true" do
    @row.value = true
    cell = @row.make_cell
    cell.accessoryType.should == UITableViewCellAccessoryCheckmark
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
formotion-0.5.1 spec/row_type/check_spec.rb
formotion-0.5 spec/row_type/check_spec.rb