Skip to content
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

Unassign guiders from groups #52

Merged
merged 2 commits into from Oct 5, 2016
Merged

Conversation

benlovell
Copy link
Member

For the moment this leaves the actual group instances around.


private

def go_back_with_success(action = :assigned)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make this parameter not optional so it's more obvious when you use it in create.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doneski.

@@ -0,0 +1,15 @@
class DestroyGroupAssignments
attr_reader :user_ids
attr_reader :group_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure you need to expose these


def then_the_group_is_unassigned_from_those_guiders
expect(@page).to have_flash_of_success
expect(@page).to have_no_text(@team_one.name)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tempting to check the groups are removed in the database too

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This behaviour is covered in the spec I added for DestroyGroupAssignments.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh I read the description now. Why is that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They could be reassigned in future as providing the name of an existing group would use that particular instance. Also it cuts out on the need for weird logic checking that the group doesn't have associated assignments and deleting on that basis.

I'm adding a typeahead on the group text field so this would expose the existing groups too.

@AndrewVos
Copy link
Contributor

Cool cool merge it

For the moment this leaves the actual group instances around.
@benlovell benlovell merged commit 867489e into master Oct 5, 2016
@benlovell benlovell deleted the delete-groups-assignments branch October 5, 2016 12:36
private

attr_reader :user_ids
attr_reader :group_id
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are these needed?
cleaner to just used @user_ids and @group_id

@@ -10,15 +10,24 @@ def index

def create
CreateGroupAssignments.new(user_ids, group_params).call
go_back_with_success(:assigned)
Copy link
Contributor

@dwhenry dwhenry Oct 5, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"The users were assigned from the specified groups"
should this be changed to:
go_back_with_success('assigned to')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants