From c610347cc19e615d0fe87950f7e3d6887317ac55 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 25 Mar 2013 13:36:08 +0200 Subject: [PATCH] Removed not relevant tests for admin.projects --- app/views/admin/projects/show.html.haml | 2 +- features/steps/admin/admin_projects.rb | 2 -- spec/features/admin/admin_projects_spec.rb | 42 ---------------------- 3 files changed, 1 insertion(+), 45 deletions(-) diff --git a/app/views/admin/projects/show.html.haml b/app/views/admin/projects/show.html.haml index 55247041..27c687bb 100644 --- a/app/views/admin/projects/show.html.haml +++ b/app/views/admin/projects/show.html.haml @@ -79,7 +79,7 @@ = link_to project_team_index_path(@project), class: "btn btn-tiny" do %i.icon-edit Edit Team - %ul.well-list + %ul.well-list.team_members - @project.users.each do |tm| %li %strong diff --git a/features/steps/admin/admin_projects.rb b/features/steps/admin/admin_projects.rb index dd6b4e98..b410b238 100644 --- a/features/steps/admin/admin_projects.rb +++ b/features/steps/admin/admin_projects.rb @@ -16,9 +16,7 @@ class AdminProjects < Spinach::FeatureSteps Then 'I should see project details' do project = Project.first current_path.should == admin_project_path(project) - page.should have_content(project.name_with_namespace) page.should have_content(project.creator.name) - page.should have_content('Add new team member') end end diff --git a/spec/features/admin/admin_projects_spec.rb b/spec/features/admin/admin_projects_spec.rb index c9ddf1f4..23370891 100644 --- a/spec/features/admin/admin_projects_spec.rb +++ b/spec/features/admin/admin_projects_spec.rb @@ -31,46 +31,4 @@ describe "Admin::Projects" do page.should have_content(@project.name) end end - - describe "GET /admin/projects/:id/edit" do - before do - visit admin_projects_path - click_link "edit_project_#{@project.id}" - end - - it "should have project edit page" do - page.should have_content("Edit project") - page.should have_button("Save Project") - end - - describe "Update project" do - before do - fill_in "project_name", with: "Big Bang" - click_button "Save Project" - @project.reload - end - - it "should show page with new data" do - page.should have_content("Big Bang") - end - - it "should change project entry" do - @project.name.should == "Big Bang" - end - end - end - - describe "Add new team member" do - before do - @new_user = create(:user) - visit admin_project_path(@project) - end - - it "should create new user" do - select @new_user.name, from: "user_ids" - expect { click_button "Add" }.to change { UsersProject.count }.by(1) - page.should have_content @new_user.name - current_path.should == admin_project_path(@project) - end - end end