Sha256: 809ffc5b622770c6c3219b57527fc9eaee364ac1c9443f3abb050d44f1f2e30a

Contents?: true

Size: 734 Bytes

Versions: 4

Compression:

Stored size: 734 Bytes

Contents

require 'spec_helper'

describe TrelloCli::Requests::CreateCard do
  before do
    Trello.should_receive(:configure)
  end

  it "should create the requested card" do
    args = { :name        => 'name',
             :description => 'desc',
             :board_id    => '123',
             :list_id     => '321' }
    options = { 'name'    => args[:name],
                'desc'    => args[:description],
                'idBoard' => args[:board_id],
                'idList'  => args[:list_id] }
    trello_card_mock = double 'trello card'
    Trello::Card.should_receive(:new).
                 with(options).
                 and_return trello_card_mock
    trello_card_mock.should_receive(:save)
    subject.create args
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
trello_cli-0.2.1 spec/requests/create_card_spec.rb
trello_cli-0.2.0 spec/requests/create_card_spec.rb
trello_cli-0.1.0 spec/requests/create_card_spec.rb
trello_cli-0.0.4 spec/requests/create_card_spec.rb