Merge branch 'master' of dev.gitlabhq.com:gitlabhq into feature/issues_search

This commit is contained in:
Adam Leonard 2011-10-25 18:34:59 -04:00
commit 0955863489
32 changed files with 262 additions and 179 deletions

View file

@ -10,7 +10,9 @@ describe "TeamMembers" do
describe "View profile" do
it "should be available" do
visit(team_project_path(@project))
find(:xpath, "//table[@id='team-table']//a[1]").click
within "#team-table" do
click_link(@user.name)
end
page.should have_content @user.skype
page.should_not have_content 'Twitter'
end
@ -29,19 +31,37 @@ describe "TeamMembers" do
describe "fill in" do
before do
check "team_member_read"
click_link "Select user"
click_link @user_1.name
#select @user_1.name, :from => "team_member_user_id"
within "#team_member_new" do
check "team_member_read"
check "team_member_write"
end
end
it { expect { click_button "Save" }.to change {UsersProject.count}.by(1) }
it { expect { click_button "Save";sleep(1) }.to change {UsersProject.count}.by(1) }
it "should add new member to table" do
click_button "Save"
@member = UsersProject.last
page.should_not have_content("Add new member")
page.should have_content @user_1.name
@member.read.should be_true
@member.write.should be_true
@member.admin.should be_false
end
it "should not allow creation without access selected" do
within "#team_member_new" do
uncheck "team_member_read"
uncheck "team_member_write"
uncheck "team_member_admin"
end
expect { click_button "Save" }.to_not change {UsersProject.count}
page.should have_content("Please choose at least one Role in the Access list")
end
end
end