Files
growstuff/spec/features/members/ban_spec.rb
Daniel O'Connor 8b4f0771c5 Ruby 3.2: Rubocop - Fix Negation matcher (#3780)
* Ruby 3.2/Bundler 2.4

* Fix creation

* Upgrade to js-routes 2. Put all js routes into a global namespace.

* Remove js-routes

* Remove

* Adjust ownership

* Appease codeclimate for the nth time

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Fix deprecation warning by explicitly calling to_fs

* Swap to will paginate successor for bootstrap

* Update app/views/members/show.html.haml

* Update app/views/plantings/index.rss.haml

* Update .env

* Update .devcontainer/.env

* Fix spec

* Update spec

* Fix spec

* Pin to 2.4.22

* 3 space indent

* Regenerate

* Update rubocop

* Rubocop

* More rubocop

* Regenerate

* Fix Capybara/NegationMatcher
2024-07-13 15:20:11 +09:30

25 lines
594 B
Ruby

# frozen_string_literal: true
require 'rails_helper'
describe "members list" do
let!(:spammer) { FactoryBot.create(:member) }
let!(:admin) { FactoryBot.create(:admin_member) }
context 'logged in as admin' do
include_context 'signed in admin'
before { visit member_path(spammer) }
it { expect(page).to have_link "Ban member" }
describe 'bans the user' do
before do
accept_confirm { click_link 'Ban member' }
end
it { expect(page).to have_link admin.login_name }
it { expect(page).to have_no_link spammer.login_name }
end
end
end