Commit 5247682d authored by azul's avatar azul

test: failing tests for #282

parent c29a0c1f
......@@ -177,7 +177,6 @@ module Group::Users
committees.each do |committe|
committe.remove_user!(user) unless committe.users.find_by_id(user.id).blank?
end
end
def open_membership?
......
......@@ -36,6 +36,36 @@ class Me::RequestsControllerTest < ActionController::TestCase
assert_response :success
end
def test_dup_group_request
user = FactoryBot.create(:user)
group = FactoryBot.create(:group)
group.add_user! user
login_as user
requesting = FactoryBot.create(:user)
request = RequestToJoinYou.create created_by: requesting,
recipient: group
group.add_user! requesting
xhr :post, :update, id: request.id, mark: 'approve'
assert_response :success
end
def test_remove_from_group_request
user = FactoryBot.create(:user)
requesting = FactoryBot.create(:user)
remove_me = FactoryBot.create(:user)
group = FactoryBot.create(:group)
group.add_user! user
group.add_user! requesting
group.add_user! remove_me
request = RequestToRemoveUser.create created_by: requesting,
recipient: group,
requestable: remove_me
login_as user
group.remove_user! remove_me
xhr :post, :update, id: request.id, mark: 'approve'
assert_response :success
end
def test_destroy_group_request
user = FactoryBot.create(:user)
group = FactoryBot.create(:group)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment