Commit, network graph refactoring

This commit is contained in:
Dmitriy Zaporozhets 2011-11-27 17:35:49 +02:00
parent 1b2fba08fe
commit a031813887
14 changed files with 125 additions and 97 deletions

View file

@ -2,7 +2,7 @@ require 'spec_helper'
describe "Commits" do
let(:project) { Factory :project }
let!(:commit) { project.repo.commits.first }
let!(:commit) { project.commit }
before do
login_as :user
project.add_access(@user, :read)
@ -48,11 +48,11 @@ describe "Commits" do
describe "GET /commits/:id" do
before do
visit project_commit_path(project, commit)
visit project_commit_path(project, commit.id)
end
it "should have valid path" do
current_path.should == project_commit_path(project, commit)
current_path.should == project_commit_path(project, commit.id)
end
end
end

View file

@ -55,12 +55,12 @@ describe "Projects" do
end
describe "GET /project_code/commit" do
it { project_commit_path(@project, @project.commit).should be_allowed_for @u1 }
it { project_commit_path(@project, @project.commit).should be_allowed_for @u3 }
it { project_commit_path(@project, @project.commit).should be_denied_for :admin }
it { project_commit_path(@project, @project.commit).should be_denied_for @u2 }
it { project_commit_path(@project, @project.commit).should be_denied_for :user }
it { project_commit_path(@project, @project.commit).should be_denied_for :visitor }
it { project_commit_path(@project, @project.commit.id).should be_allowed_for @u1 }
it { project_commit_path(@project, @project.commit.id).should be_allowed_for @u3 }
it { project_commit_path(@project, @project.commit.id).should be_denied_for :admin }
it { project_commit_path(@project, @project.commit.id).should be_denied_for @u2 }
it { project_commit_path(@project, @project.commit.id).should be_denied_for :user }
it { project_commit_path(@project, @project.commit.id).should be_denied_for :visitor }
end
describe "GET /project_code/team" do

View file

@ -79,6 +79,7 @@ describe "Projects" do
end
it "should beahave like activities page" do
save_and_open_page
within ".project-update" do
page.should have_content("master")
page.should have_content(@project.commit.author.name)