Styled New/Edit Project for admin area

This commit is contained in:
randx 2012-07-28 00:42:44 +03:00
parent 217810433b
commit 69e41250d1
5 changed files with 62 additions and 55 deletions

View file

@ -41,15 +41,15 @@ describe "Admin::Projects" do
end
it "should have project edit page" do
page.should have_content("Name")
page.should have_content("Code")
page.should have_content("Project name")
page.should have_content("URL")
end
describe "Update project" do
before do
fill_in "project_name", :with => "Big Bang"
fill_in "project_code", :with => "BB1"
click_button "Save"
click_button "Save Project"
@project.reload
end
@ -76,20 +76,19 @@ describe "Admin::Projects" do
end
it "should have labels for new project" do
page.should have_content("Name")
page.should have_content("Path")
page.should have_content("Description")
page.should have_content("Project name is")
page.should have_content("Git Clone")
page.should have_content("URL")
end
end
describe "POST /admin/projects" do
before do
visit new_admin_project_path
fill_in 'Name', :with => 'NewProject'
fill_in 'Code', :with => 'NPR'
fill_in 'Path', :with => 'gitlabhq_1'
fill_in 'Description', :with => 'New Project Description'
expect { click_button "Save" }.to change { Project.count }.by(1)
fill_in 'project_name', :with => 'NewProject'
fill_in 'project_code', :with => 'NPR'
fill_in 'project_path', :with => 'gitlabhq_1'
expect { click_button "Create project" }.to change { Project.count }.by(1)
@project = Project.last
end
@ -100,7 +99,6 @@ describe "Admin::Projects" do
it "should show project" do
page.should have_content(@project.name)
page.should have_content(@project.path)
page.should have_content(@project.description)
end
end