Sha256: dfd7026662add067d739c1f47ebb041ea2581d5ddb92a5b61b9b81550f5b6f55
Contents?: true
Size: 1.46 KB
Versions: 1
Compression:
Stored size: 1.46 KB
Contents
require_relative '../../../test_helper' module Troo describe Comment do let(:described_class) { Comment } let(:described_instance) { Fabricate.build(:comment) } subject { described_instance } context 'attributes' do it 'should have a text attribute' do subject.text.must_equal 'My Test Comment' end it 'should have a date attribute' do subject.date.must_equal '2013-12-17 22:01:13 UTC' end it 'should have an external_board_id attribute' do subject.external_board_id.must_equal '526d8e130a14a9d846001d96' end it 'should have an external_card_id attribute' do subject.external_card_id.must_equal '526d8f19ddb279532e005259' end it 'should have an external_comment_id attribute' do subject.external_comment_id.must_equal '51f9277b2822b8654f0023af' end it 'should have a external_member_id attribute' do subject.external_member_id.must_equal '5195fdb5a8c01a2318004f5d' end end context 'associations' do before do @board = Fabricate(:board) @card = Fabricate(:card) @member = Fabricate(:member) end after { database_cleanup } it 'belongs to a board' do subject.board.must_equal @board end it 'belongs to a card' do subject.card.must_equal @card end it 'belongs to a member' do subject.member.must_equal @member end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
troo-0.0.8 | test/lib/troo/models/comment_test.rb |