From 0f5e9d5b41a24715df097cd72a1083998e76f30b Mon Sep 17 00:00:00 2001 From: omgrr Date: Mon, 21 Dec 2015 14:56:30 -0600 Subject: [PATCH] Remove checklists on newly created cards --- lib/github_to_trello/trello_gateway.rb | 10 +--------- spec/integration/trello_gateway_spec.rb | 9 --------- 2 files changed, 1 insertion(+), 18 deletions(-) diff --git a/lib/github_to_trello/trello_gateway.rb b/lib/github_to_trello/trello_gateway.rb index 8d8a2ae..6d0afaa 100644 --- a/lib/github_to_trello/trello_gateway.rb +++ b/lib/github_to_trello/trello_gateway.rb @@ -44,19 +44,11 @@ def _existing_card(issue) end def _create_card(issue) - card = Trello::Card.create( + Trello::Card.create( :name => issue.title, :list_id => inbox.id, :desc => issue.body + "\n" + issue.html_url + "\n" + issue.updated_at.to_s, ) - _add_checklist_to(card) - card - end - - def _add_checklist_to(card) - checklist = Trello::Checklist.create(:name => "Todo", :board_id => board.id) - checklist.add_item("Initial Response") - card.add_checklist(checklist) end def _board(id) diff --git a/spec/integration/trello_gateway_spec.rb b/spec/integration/trello_gateway_spec.rb index 794f2a3..190a89c 100644 --- a/spec/integration/trello_gateway_spec.rb +++ b/spec/integration/trello_gateway_spec.rb @@ -96,15 +96,6 @@ expect(card.list.name).to eq("django_blog") end - it "includes a checklist with item for initial response when creating cards" do - card = @gateway.create_or_update_card(@issue) - expect(card.checklists.length).to eq 1 - - checklist = card.checklists.first - expect(checklist.items.length).to eq 1 - expect(checklist.items.first.name).to eq "Initial Response" - end - it "does not add a duplicate card if card exits in list already" do card = @gateway.create_or_update_card(@issue) card = @gateway.create_or_update_card(@issue)