Sha256: 09842f78f31559c35b4fbafbc8672e13a9ee7c3cc576a88328743a84f0f10efa

Contents?: true

Size: 670 Bytes

Versions: 5

Compression:

Stored size: 670 Bytes

Contents

require 'spec_helper'

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

  it "should move the card to the requested list" do
    args = { card_id: '123', list_id: '321' }
    trello_card_mock = double 'trello card'
    trello_list_mock = double 'trello list'
    Trello::Card.should_receive(:new).
                 with('id' => args[:card_id]).
                 and_return trello_card_mock
    Trello::List.should_receive(:find).
                 with(args[:list_id]).
                 and_return trello_list_mock
    trello_card_mock.should_receive(:move_to_list).with(trello_list_mock)
    subject.move args
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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