-
Notifications
You must be signed in to change notification settings - Fork 77
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
Ignore deleted team members on project's page #320
Conversation
Current Code Coverage Percent of this PR:99.52 %Files having coverage below 100%
|
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.
Try to split the spec into more scenarios.
In this case,
For company_users#index
they could be
it "lists company 1 company_users"
"does not list company 2 company_users"
"does not list discarded company users"
…ub.com/saeloun/miru-web into ignore-deleted-team-members-on-project
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.
1 suggestion, rest LGTM 🎉
result = [ { id: user1.id, name: user1.full_name }, { id: user2.id, name: user2.full_name }] | ||
expect(json_response["users"]).to match_array(JSON.parse(result.to_json)) | ||
end | ||
|
||
it "does not return the discarded users of company1" do | ||
expect(json_response["users"].map { |user| user["id"] }).not_to include user4.id |
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.
expect(json_response["users"].map { |user| user["id"] }).not_to include user4.id | |
expect(json_response["users"].pluck("id").not_to include user4.id |
end | ||
|
||
it "does not return the users of company2" do | ||
expect(json_response["users"].map { |user| user["id"] }).not_to include user3.id |
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.
expect(json_response["users"].map { |user| user["id"] }).not_to include user3.id | |
expect(json_response["users"].pluck("id")).not_to include user3.id |
@apoorv1316 Please test this is working as expected. If yes, please merge |
It's working fine. We can merge this once Rohit's suggestions are implemented. @supriya3105 @shalapatil |
Notion card
https://www.notion.so/saeloun/Able-to-add-a-deleted-team-member-to-project-team-5fc1026dbe544a2c9a45067be9a0f6fd
Summary
Deleted team members were available in project team members add dropdown. Fixed it to not show deleted team members.
Preview
Type of change
Please delete options that are not relevant.
not work as expected)
How Has This Been Tested?
Checklist: