Skip to content

Instantly share code, notes, and snippets.

@domagude domagude/post_spec.rb
Last active Sep 24, 2018

Embed
What would you like to do?
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
@Al-un

This comment has been minimized.

Copy link

Al-un commented Sep 24, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.