Commit 1e3f09b21f124b15eebf71a23c12cfa41f1e5372

Authored by Dmitriy Zaporozhets
1 parent 128ef337

Fix tests

spec/controllers/commit_controller_spec.rb
@@ -3,7 +3,7 @@ require 'spec_helper' @@ -3,7 +3,7 @@ require 'spec_helper'
3 describe Projects::CommitController do 3 describe Projects::CommitController do
4 let(:project) { create(:project_with_code) } 4 let(:project) { create(:project_with_code) }
5 let(:user) { create(:user) } 5 let(:user) { create(:user) }
6 - let(:commit) { project.repository.last_commit_for("master") } 6 + let(:commit) { project.repository.commit("master") }
7 7
8 before do 8 before do
9 sign_in(user) 9 sign_in(user)
spec/features/security/project_access_spec.rb
@@ -175,8 +175,8 @@ describe "Application access" do @@ -175,8 +175,8 @@ describe "Application access" do
175 it { should be_denied_for :visitor } 175 it { should be_denied_for :visitor }
176 end 176 end
177 177
178 - describe "GET /project_code/repository" do  
179 - subject { project_repository_path(project) } 178 + describe "GET /project_code/branches/recent" do
  179 + subject { recent_project_branches_path(project) }
180 180
181 it { should be_allowed_for master } 181 it { should be_allowed_for master }
182 it { should be_allowed_for reporter } 182 it { should be_allowed_for reporter }
@@ -186,7 +186,7 @@ describe "Application access" do @@ -186,7 +186,7 @@ describe "Application access" do
186 it { should be_denied_for :visitor } 186 it { should be_denied_for :visitor }
187 end 187 end
188 188
189 - describe "GET /project_code/repository/branches" do 189 + describe "GET /project_code/branches" do
190 subject { project_branches_path(project) } 190 subject { project_branches_path(project) }
191 191
192 before do 192 before do
@@ -202,7 +202,7 @@ describe "Application access" do @@ -202,7 +202,7 @@ describe "Application access" do
202 it { should be_denied_for :visitor } 202 it { should be_denied_for :visitor }
203 end 203 end
204 204
205 - describe "GET /project_code/repository/tags" do 205 + describe "GET /project_code/tags" do
206 subject { project_tags_path(project) } 206 subject { project_tags_path(project) }
207 207
208 before do 208 before do
@@ -417,8 +417,8 @@ describe "Application access" do @@ -417,8 +417,8 @@ describe "Application access" do
417 it { should be_denied_for :visitor } 417 it { should be_denied_for :visitor }
418 end 418 end
419 419
420 - describe "GET /project_code/repository" do  
421 - subject { project_repository_path(project) } 420 + describe "GET /project_code/branches/recent" do
  421 + subject { recent_project_branches_path(project) }
422 422
423 it { should be_allowed_for master } 423 it { should be_allowed_for master }
424 it { should be_allowed_for reporter } 424 it { should be_allowed_for reporter }
@@ -428,7 +428,7 @@ describe "Application access" do @@ -428,7 +428,7 @@ describe "Application access" do
428 it { should be_denied_for :visitor } 428 it { should be_denied_for :visitor }
429 end 429 end
430 430
431 - describe "GET /project_code/repository/branches" do 431 + describe "GET /project_code/branches" do
432 subject { project_branches_path(project) } 432 subject { project_branches_path(project) }
433 433
434 before do 434 before do
@@ -444,7 +444,7 @@ describe "Application access" do @@ -444,7 +444,7 @@ describe "Application access" do
444 it { should be_denied_for :visitor } 444 it { should be_denied_for :visitor }
445 end 445 end
446 446
447 - describe "GET /project_code/repository/tags" do 447 + describe "GET /project_code/tags" do
448 subject { project_tags_path(project) } 448 subject { project_tags_path(project) }
449 449
450 before do 450 before do