spec/soundcloud_comment_spec.rb in soundcloud-ruby-api-wrapper-0.1.3 vs spec/soundcloud_comment_spec.rb in soundcloud-ruby-api-wrapper-0.1.5
- old
+ new
@@ -7,11 +7,11 @@
# @api_test_2 = @sc.User.find('api-test-2')
# @api_test_3 = @sc.User.find('api-test-3')
@track = @sc.Track.find('static-test-track')
end
- it 'should be able to create and deleta a new comment for a track' do
+ it 'should be able to create and delete a new comment for a track' do
old_count = @track.comments.count
comment = @sc.Comment.create({:track_id => @track.id, :body => "new API Test comment"})
@track.comments.reload.count.should be old_count + 1
@@ -25,7 +25,11 @@
comment.user.id.should_not be nil
comment.track.id.should_not be nil
end
+ it 'should create a new comment and associate the track_id' do
+ comment = @sc.Comment.new({:track => @track})
+ comment.track_id.should be @track.id
+ end
end