docbrown/spec/system/user_selects_looking_for_work.rb
Mac Siri fc39f24ee3 Migrate feature test to system test (#2301)
* 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
2019-04-04 12:15:10 -04:00

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