Commit 9cd1069a8c0c9193c5867d12419eb5b9852f6411
1 parent
baa54629
Exists in
master
and in
4 other branches
[Tests] Better project coverage
Showing
2 changed files
with
28 additions
and
20 deletions
Show diff stats
spec/monkeypatch.rb
spec/requests/projects_spec.rb
| @@ -75,15 +75,23 @@ describe "Projects" do | @@ -75,15 +75,23 @@ describe "Projects" do | ||
| 75 | it "should be correct path" do | 75 | it "should be correct path" do |
| 76 | current_path.should == project_path(@project) | 76 | current_path.should == project_path(@project) |
| 77 | end | 77 | end |
| 78 | + end | ||
| 79 | + | ||
| 80 | + describe "GET /projects/graph" do | ||
| 81 | + before do | ||
| 82 | + @project = Factory :project, :path => "gitlab_remove" | ||
| 83 | + @project.add_access(@user, :read) | ||
| 84 | + | ||
| 85 | + visit graph_project_path(@project) | ||
| 86 | + end | ||
| 78 | 87 | ||
| 79 | - # TODO: replace with real one | ||
| 80 | - #it "should beahave like activities page" do | ||
| 81 | - #within ".project-update" do | ||
| 82 | - #page.should have_content("master") | ||
| 83 | - #page.should have_content(@project.commit.author.name) | ||
| 84 | - #page.should have_content(@project.commit.safe_message) | ||
| 85 | - #end | ||
| 86 | - #end | 88 | + it "should be correct path" do |
| 89 | + current_path.should == graph_project_path(@project) | ||
| 90 | + end | ||
| 91 | + | ||
| 92 | + it "should have as as team member" do | ||
| 93 | + page.should have_content("master") | ||
| 94 | + end | ||
| 87 | end | 95 | end |
| 88 | 96 | ||
| 89 | describe "GET /projects/team" do | 97 | describe "GET /projects/team" do |
| @@ -146,15 +154,15 @@ describe "Projects" do | @@ -146,15 +154,15 @@ describe "Projects" do | ||
| 146 | end | 154 | end |
| 147 | end | 155 | end |
| 148 | 156 | ||
| 149 | - #describe "DELETE /projects/:id", :js => true do | ||
| 150 | - #before do | ||
| 151 | - #@project = Factory :project | ||
| 152 | - #@project.add_access(@user, :read, :admin) | ||
| 153 | - #visit projects_path | ||
| 154 | - #end | ||
| 155 | - | ||
| 156 | - #it "should be correct path" do | ||
| 157 | - #expect { click_link "Destroy" }.to change {Project.count}.by(1) | ||
| 158 | - #end | ||
| 159 | - #end | 157 | + describe "DELETE /projects/:id" do |
| 158 | + before do | ||
| 159 | + @project = Factory :project | ||
| 160 | + @project.add_access(@user, :read, :admin) | ||
| 161 | + visit edit_project_path(@project) | ||
| 162 | + end | ||
| 163 | + | ||
| 164 | + it "should be correct path" do | ||
| 165 | + expect { click_link "Remove" }.to change {Project.count}.by(-1) | ||
| 166 | + end | ||
| 167 | + end | ||
| 160 | end | 168 | end |