[Tests] Better project coverage
This commit is contained in:
parent
baa54629a9
commit
9cd1069a8c
2 changed files with 27 additions and 19 deletions
|
@ -5,7 +5,7 @@ class Project
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
def update_repository
|
def destroy_repository
|
||||||
true
|
true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -75,15 +75,23 @@ describe "Projects" do
|
||||||
it "should be correct path" do
|
it "should be correct path" do
|
||||||
current_path.should == project_path(@project)
|
current_path.should == project_path(@project)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
# TODO: replace with real one
|
describe "GET /projects/graph" do
|
||||||
#it "should beahave like activities page" do
|
before do
|
||||||
#within ".project-update" do
|
@project = Factory :project, :path => "gitlab_remove"
|
||||||
#page.should have_content("master")
|
@project.add_access(@user, :read)
|
||||||
#page.should have_content(@project.commit.author.name)
|
|
||||||
#page.should have_content(@project.commit.safe_message)
|
visit graph_project_path(@project)
|
||||||
#end
|
end
|
||||||
#end
|
|
||||||
|
it "should be correct path" do
|
||||||
|
current_path.should == graph_project_path(@project)
|
||||||
|
end
|
||||||
|
|
||||||
|
it "should have as as team member" do
|
||||||
|
page.should have_content("master")
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
describe "GET /projects/team" do
|
describe "GET /projects/team" do
|
||||||
|
@ -146,15 +154,15 @@ describe "Projects" do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
#describe "DELETE /projects/:id", :js => true do
|
describe "DELETE /projects/:id" do
|
||||||
#before do
|
before do
|
||||||
#@project = Factory :project
|
@project = Factory :project
|
||||||
#@project.add_access(@user, :read, :admin)
|
@project.add_access(@user, :read, :admin)
|
||||||
#visit projects_path
|
visit edit_project_path(@project)
|
||||||
#end
|
end
|
||||||
|
|
||||||
#it "should be correct path" do
|
it "should be correct path" do
|
||||||
#expect { click_link "Destroy" }.to change {Project.count}.by(1)
|
expect { click_link "Remove" }.to change {Project.count}.by(-1)
|
||||||
#end
|
end
|
||||||
#end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue