2014-03-30 23:10:26 +08:00
|
|
|
require 'spec_helper'
|
|
|
|
|
|
|
|
describe Like do
|
|
|
|
it "add like" do
|
2016-04-25 12:27:32 +08:00
|
|
|
a = Post.create!(title: 'one', content: '1'*31)
|
2014-03-30 23:10:26 +08:00
|
|
|
like = Like.new
|
|
|
|
like.post = a
|
|
|
|
expect(like.save).to eq(true)
|
|
|
|
end
|
|
|
|
end
|