mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
Disable RSpec/ChangeByZero to fix spec
The and chaining doesn't work with no change assumptions
This commit is contained in:
@@ -279,6 +279,11 @@ RSpec/LeadingSubject:
|
||||
RSpec/NamedSubject:
|
||||
Enabled: false
|
||||
|
||||
# expect not_to change is not working as expected
|
||||
# if you chain it with multiple expected changes
|
||||
RSpec/ChangeByZero:
|
||||
Enabled: false
|
||||
|
||||
RSpec/ContextWording:
|
||||
Prefixes:
|
||||
- and
|
||||
|
||||
@@ -290,8 +290,8 @@ RSpec.describe MembersController do
|
||||
|
||||
it "adds the existing user as a member instead of creating a new invitation" do
|
||||
expect { post :create, params: }
|
||||
.to not_change(User, :count).by(0)
|
||||
.and change(Member, :count).by(1)
|
||||
.to change(Member, :count).by(1)
|
||||
.and change(User, :count).by(0)
|
||||
|
||||
expect(response).to redirect_to "/projects/pet_project/members?status=all"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user