2022-12-23 13:40:05 +01:00
|
|
|
require "git"
|
|
|
|
require "test_helper"
|
|
|
|
|
|
|
|
module Merged
|
|
|
|
class CardWriteTest < ActiveSupport::TestCase
|
|
|
|
include CardHelper
|
|
|
|
include Cleanup
|
|
|
|
|
|
|
|
def test_deletes
|
|
|
|
id = first.id
|
2022-12-26 17:09:31 +01:00
|
|
|
first.delete_save!
|
2022-12-23 13:40:05 +01:00
|
|
|
assert_raises(ActiveHash::RecordNotFound) {Card.find(id) }
|
|
|
|
end
|
|
|
|
|
2022-12-26 17:09:31 +01:00
|
|
|
def test_adds
|
|
|
|
card = Card.first.section.new_card
|
|
|
|
card.add_save!
|
|
|
|
assert_equal "NEW" , card.header
|
2022-12-23 13:40:05 +01:00
|
|
|
end
|
|
|
|
|
2022-12-26 17:09:31 +01:00
|
|
|
|
2022-12-23 13:40:05 +01:00
|
|
|
end
|
|
|
|
end
|