2016-08-07 00:44:11 +08:00
|
|
|
require 'rails_helper'
|
2014-03-30 23:10:26 +08:00
|
|
|
|
2016-08-07 00:44:11 +08:00
|
|
|
RSpec.describe Like, type: :model do
|
2014-03-30 23:10:26 +08:00
|
|
|
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
|