Created
April 29, 2016 08:42
-
-
Save gen1321/5c771c8da502c3917a93b8ddc07272aa to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rails_helper' | |
describe History ,type: :model do | |
let(:member){ create(:member) } | |
let(:channel){ create(:channel) } | |
let(:create_sub){create(:subscription )} | |
it 'should be created after subscribe' do | |
expect{create_sub}.to change{History.count}.by(1) | |
end | |
it 'should be created after unsubscribe' do | |
create_sub | |
expect{create_sub.destroy}.to change{History.count}.by(1) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment