Last active
September 24, 2018 14:47
-
-
Save domagude/1f47fcd36fb553615fe5b720f003022a 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' | |
RSpec.describe Post, type: :model do | |
context 'Associations' do | |
it 'belongs_to user' do | |
association = described_class.reflect_on_association(:user).macro | |
expect(association).to eq :belongs_to | |
end | |
it 'belongs_to category' do | |
association = described_class.reflect_on_association(:category).macro | |
expect(association).to eq :belongs_to | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The duplicate on the user association testing (
line 11
) is corrected here but the duplicate is still here on your repository: https://github.com/domagude/collabfield/blob/master/spec/models/post_spec.rb