Replace card id with card number
This commit is contained in:
committed by
Mike Dalessio
parent
915c1202f8
commit
32d96db7d9
Vendored
+2
@@ -1,7 +1,9 @@
|
||||
37s:
|
||||
name: 37signals
|
||||
external_account_id: <%= ActiveRecord::FixtureSet.identify("37signals") %>
|
||||
cards_count: 5
|
||||
|
||||
initech:
|
||||
name: Initech LLC
|
||||
external_account_id: <%= ActiveRecord::FixtureSet.identify("initech") %>
|
||||
cards_count: 0
|
||||
|
||||
Vendored
+5
@@ -1,4 +1,5 @@
|
||||
logo:
|
||||
number: 1
|
||||
board: writebook
|
||||
creator: david
|
||||
column: writebook_triage
|
||||
@@ -10,6 +11,7 @@ logo:
|
||||
account: 37s
|
||||
|
||||
layout:
|
||||
number: 2
|
||||
board: writebook
|
||||
creator: david
|
||||
column: writebook_triage
|
||||
@@ -20,6 +22,7 @@ layout:
|
||||
account: 37s
|
||||
|
||||
text:
|
||||
number: 3
|
||||
board: writebook
|
||||
creator: kevin
|
||||
column: writebook_in_progress
|
||||
@@ -30,6 +33,7 @@ text:
|
||||
account: 37s
|
||||
|
||||
shipping:
|
||||
number: 4
|
||||
board: writebook
|
||||
creator: kevin
|
||||
column: writebook_triage
|
||||
@@ -40,6 +44,7 @@ shipping:
|
||||
account: 37s
|
||||
|
||||
buy_domain:
|
||||
number: 5
|
||||
board: writebook
|
||||
creator: david
|
||||
title: Buy domain
|
||||
|
||||
@@ -5,6 +5,19 @@ class CardTest < ActiveSupport::TestCase
|
||||
Current.session = sessions(:david)
|
||||
end
|
||||
|
||||
test "create assigns a number to the card" do
|
||||
user = users(:david)
|
||||
board = boards(:writebook)
|
||||
account = board.account
|
||||
card = nil
|
||||
|
||||
assert_difference -> { account.reload.cards_count }, +1 do
|
||||
card = Card.create!(title: "Test", board: board, creator: user)
|
||||
end
|
||||
|
||||
assert_equal account.reload.cards_count, card.number
|
||||
end
|
||||
|
||||
test "capturing messages" do
|
||||
assert_difference -> { cards(:logo).comments.count }, +1 do
|
||||
cards(:logo).comments.create!(body: "Agreed.")
|
||||
|
||||
Reference in New Issue
Block a user