Merge commit 'ead13d4826a7ba1699d6bb310e58642b15687671' into glitch-soc/merge-upstream
This commit is contained in:
commit
c2e6cbb12b
166 files changed
+1123
-500
No files matched your search
@@ -26,10 +26,12 @@ RSpec.describe 'Admin::IpBlocks' do
|
||||
|
||||
# Valid with IP
|
||||
fill_in 'ip_block_ip', with: '192.168.1.1'
|
||||
fill_in 'ip_block_comment', with: 'Block explanation'
|
||||
expect { submit_form }
|
||||
.to change(IpBlock, :count).by(1)
|
||||
expect(page)
|
||||
.to have_text(I18n.t('admin.ip_blocks.created_msg'))
|
||||
.and have_text('Block explanation')
|
||||
end
|
||||
|
||||
def submit_form
|
||||
|
||||
@@ -6,8 +6,11 @@ RSpec.describe 'Disputes Strikes' do
|
||||
before { sign_in(current_user) }
|
||||
|
||||
describe 'viewing strike disputes' do
|
||||
let!(:strike) { Fabricate(:account_warning, target_account: current_user.account, report:, status_ids: [status.id]) }
|
||||
let(:current_user) { Fabricate(:user) }
|
||||
let!(:strike) { Fabricate(:account_warning, target_account: current_user.account) }
|
||||
let(:report) { Fabricate :report, category: :violation, rule_ids: rules.map(&:id), target_account: current_user.account }
|
||||
let(:rules) { Fabricate.times 2, :rule }
|
||||
let(:status) { Fabricate :status, account: current_user.account, text: 'Offensive text' }
|
||||
|
||||
it 'shows a list of strikes and details for each' do
|
||||
visit disputes_strikes_path
|
||||
@@ -18,6 +21,8 @@ RSpec.describe 'Disputes Strikes' do
|
||||
expect(page)
|
||||
.to have_title(strike_page_title)
|
||||
.and have_text(strike.text)
|
||||
.and have_text(rules.last.text)
|
||||
.and have_text(status.text)
|
||||
end
|
||||
|
||||
def strike_page_title
|
||||
|
||||
Reference in new issue
Block a user