-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: Assignments limit shouldn't prevent from reassigning a post #556
FIX: Assignments limit shouldn't prevent from reassigning a post #556
Conversation
95981fc
to
67e7c2c
Compare
67e7c2c
to
ac760c2
Compare
spec/lib/assigner_spec.rb
Outdated
@@ -264,6 +264,21 @@ def assigned_to?(assignee) | |||
expect(second_assign[:success]).to eq(true) | |||
end | |||
|
|||
it "assignments limit doesn't prevent from reassigning a post" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats not a very english sentence
spec/lib/assigner_spec.rb
Outdated
@@ -264,6 +264,21 @@ def assigned_to?(assignee) | |||
expect(second_assign[:success]).to eq(true) | |||
end | |||
|
|||
it "assignments limit doesn't prevent from reassigning a post" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about?
it "assignments limit doesn't prevent from reassigning a post" do | |
it "reassigns even when at the assignments limit" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, with one detail that we should explicitly mention that this test is for reassigning a post. We also reassign topics sometimes.
At the moment, it's possible to have maximum 5 assignments per topic (that includes topic and post assignments). When trying to assign more, this message appears:
One possible edge case here is reassigning a topic or a post. Reassignment doesn't lead to exceeding the limit, and therefore it should be possible. But at the moment we handle correctly only topic reassignments, while when reassigning a post, we show the error message "the limit has been reached".
This PR makes post reassignments work correctly too.