forked from TheEssem/mastodon
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
expect
in remaining controller locations (mastodon#33748)
- Loading branch information
1 parent
ea743d6
commit 93f3c72
Showing
9 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe 'Filters Statuses' do | ||
describe 'POST /filters/:filter_id/statuses/batch' do | ||
before { sign_in(user) } | ||
|
||
let(:filter) { Fabricate :custom_filter, account: user.account } | ||
let(:user) { Fabricate :user } | ||
|
||
it 'gracefully handles invalid nested params' do | ||
post batch_filter_statuses_path(filter.id, form_status_filter_batch_action: 'invalid') | ||
|
||
expect(response) | ||
.to redirect_to(edit_filter_path(filter)) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe 'Relationships' do | ||
describe 'PUT /relationships' do | ||
before { sign_in Fabricate(:user) } | ||
|
||
it 'gracefully handles invalid nested params' do | ||
put relationships_path(form_account_batch: 'invalid') | ||
|
||
expect(response) | ||
.to redirect_to(relationships_path) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'rails_helper' | ||
|
||
RSpec.describe 'Settings Preferences Appearance' do | ||
describe 'PUT /settings/preferences/appearance' do | ||
before { sign_in Fabricate(:user) } | ||
|
||
it 'gracefully handles invalid nested params' do | ||
put settings_preferences_appearance_path(user: 'invalid') | ||
|
||
expect(response) | ||
.to have_http_status(400) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters