* Move all features to system * Remove database_cleaner & apply use_transactional_fixtures * Move rspec-retry to :test * Update Capybara config * Update rails_helper * Fix user_visits_a_comments_page_spec.rb * Fix lint
18 lines
384 B
Ruby
18 lines
384 B
Ruby
require "rails_helper"
|
|
|
|
RSpec.describe "Looking For Work" do
|
|
let(:user) { create(:user) }
|
|
let(:tag) { create(:tag, name: "hiring") }
|
|
|
|
before do
|
|
login_as(user)
|
|
tag
|
|
end
|
|
|
|
it "user selects looking for work and autofollows hiring tag" do
|
|
visit "/settings"
|
|
page.check "Looking for work"
|
|
click_button("submit")
|
|
expect(user.follows.count).to eq(1)
|
|
end
|
|
end
|