* Initial automatic cleanup with rubocop * Fix syntax error introduced by rubocop * Cleanup seeds file * Cleanup lib folder * Exclude bin folder because it contains auto generated files * Make Rubocop a little bit more chatty * Block length should not include comments in the count * Cleanup config folder * Cleanup specs * Updated Rubocop version and generated a todo file * Fix broken ArticlesApi spec * Fix tests * Restored rubocop pre-commit hook
16 lines
496 B
Ruby
16 lines
496 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe FollowChecker do
|
|
let(:user) { create(:user) }
|
|
|
|
it "checks if following a thing and returns true if they are" do
|
|
user2 = create(:user)
|
|
user.follow(user2)
|
|
expect(described_class.new(user, "User", user2.id).cached_follow_check).to eq(true)
|
|
end
|
|
|
|
it "checks if following a thing and returns false if they are not" do
|
|
user2 = create(:user)
|
|
expect(described_class.new(user, "User", user2.id).cached_follow_check).to eq(false)
|
|
end
|
|
end
|