diff options
author | Adam Niedzielski <adamsunday@gmail.com> | 2016-08-03 21:57:09 +0300 |
---|---|---|
committer | Adam Niedzielski <adamsunday@gmail.com> | 2016-08-03 21:57:09 +0300 |
commit | d12570280095cf26fc4a019b85579ecd3efdb7ec (patch) | |
tree | 436646d49e6b67df8c7b8486e7cb3bed88233640 /spec/features/projects/members | |
parent | b2c8dc6f35ceb08e23422a356831070b5136809d (diff) |
Add test for a member with the expiration date.
Diffstat (limited to 'spec/features/projects/members')
-rw-r--r-- | spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb new file mode 100644 index 00000000000..87d9208465e --- /dev/null +++ b/spec/features/projects/members/master_adds_member_with_expiration_date_spec.rb @@ -0,0 +1,27 @@ +require 'spec_helper' + +feature 'Projects > Members > Master adds member with expiration date', feature: true, js: true do + include Select2Helper + + let!(:master) { create(:user) } + let!(:project) { create(:project) } + let!(:new_member) { create(:user) } + + background do + project.team << [master, :master] + login_as(master) + visit namespace_project_project_members_path(project.namespace, project) + end + + scenario 'expiration date is displayed in the members list' do + page.within ".users-project-form" do + select2(new_member.id, from: "#user_ids", multiple: true) + fill_in "Access expiration date", with: "2016-08-02" + click_on "Add users to project" + end + + page.within ".project_member:first-child" do + expect(page).to have_content("Access expires Aug 2, 2016") + end + end +end |