Commit 1e3f09b2 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix tests

parent 128ef337
......@@ -3,7 +3,7 @@ require 'spec_helper'
describe Projects::CommitController do
let(:project) { create(:project_with_code) }
let(:user) { create(:user) }
let(:commit) { project.repository.last_commit_for("master") }
let(:commit) { project.repository.commit("master") }
before do
sign_in(user)
......
......@@ -175,8 +175,8 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository" do
subject { project_repository_path(project) }
describe "GET /project_code/branches/recent" do
subject { recent_project_branches_path(project) }
it { should be_allowed_for master }
it { should be_allowed_for reporter }
......@@ -186,7 +186,7 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository/branches" do
describe "GET /project_code/branches" do
subject { project_branches_path(project) }
before do
......@@ -202,7 +202,7 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository/tags" do
describe "GET /project_code/tags" do
subject { project_tags_path(project) }
before do
......@@ -417,8 +417,8 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository" do
subject { project_repository_path(project) }
describe "GET /project_code/branches/recent" do
subject { recent_project_branches_path(project) }
it { should be_allowed_for master }
it { should be_allowed_for reporter }
......@@ -428,7 +428,7 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository/branches" do
describe "GET /project_code/branches" do
subject { project_branches_path(project) }
before do
......@@ -444,7 +444,7 @@ describe "Application access" do
it { should be_denied_for :visitor }
end
describe "GET /project_code/repository/tags" do
describe "GET /project_code/tags" do
subject { project_tags_path(project) }
before do
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment