Sha256: 86b917b7b9ce6a513bc075eaafaf659bc26f7fe18d942e50ffd4ca7e6b435e95
Contents?: true
Size: 907 Bytes
Versions: 28
Compression:
Stored size: 907 Bytes
Contents
require 'test_helper' class CommentsTest < Totter::TestCase def test_comments VCR.use_cassette 'comments/index' do comments = local_client.comments(1, 19) assert_equal Array, comments.class assert_equal 'More cheese!', comments[0].message end end def test_creating_comment VCR.use_cassette 'comments/create' do message = "I'd like to buy a vowel." comment = local_client.create_comment(1, 19, message) assert_equal message, comment.message end end def test_destroying_comment VCR.use_cassette 'comments/destroy' do previous_length = local_client.comments(1, 19).length comment = local_client.create_comment(1, 19, "Going to be deleted") assert local_client.destroy_comment(1, 19, comment.id) current_length = local_client.comments(1, 19).length assert_equal previous_length, current_length end end end
Version data entries
28 entries across 28 versions & 1 rubygems