Few more fixes after removing roles
This commit is contained in:
parent
cac7723451
commit
40a956eb68
|
@ -15,9 +15,6 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class Event < ActiveRecord::Base
|
class Event < ActiveRecord::Base
|
||||||
include NoteEvent
|
|
||||||
include PushEvent
|
|
||||||
|
|
||||||
attr_accessible :project, :action, :data, :author_id, :project_id,
|
attr_accessible :project, :action, :data, :author_id, :project_id,
|
||||||
:target_id, :target_type
|
:target_id, :target_type
|
||||||
|
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
require Rails.root.join("app/models/commit")
|
require Rails.root.join("app/models/commit")
|
||||||
require Rails.root.join("app/roles/static_model")
|
require Rails.root.join("lib/static_model")
|
||||||
|
|
||||||
class MergeRequest < ActiveRecord::Base
|
class MergeRequest < ActiveRecord::Base
|
||||||
include IssueCommonality
|
include IssueCommonality
|
||||||
|
|
|
@ -133,14 +133,6 @@ describe Project do
|
||||||
it { should respond_to(:path_with_namespace) }
|
it { should respond_to(:path_with_namespace) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'modules' do
|
|
||||||
it { should include_module(Repository) }
|
|
||||||
it { should include_module(PushObserver) }
|
|
||||||
it { should include_module(Authority) }
|
|
||||||
it { should include_module(Team) }
|
|
||||||
it { should include_module(NamespacedProject) }
|
|
||||||
end
|
|
||||||
|
|
||||||
it "should return valid url to repo" do
|
it "should return valid url to repo" do
|
||||||
project = Project.new(path: "somewhere")
|
project = Project.new(path: "somewhere")
|
||||||
project.url_to_repo.should == Gitlab.config.gitolite.ssh_path_prefix + "somewhere.git"
|
project.url_to_repo.should == Gitlab.config.gitolite.ssh_path_prefix + "somewhere.git"
|
||||||
|
|
|
@ -65,10 +65,6 @@ describe User do
|
||||||
it { should ensure_length_of(:bio).is_within(0..255) }
|
it { should ensure_length_of(:bio).is_within(0..255) }
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'modules' do
|
|
||||||
it { should include_module(Account) }
|
|
||||||
end
|
|
||||||
|
|
||||||
describe "Respond to" do
|
describe "Respond to" do
|
||||||
it { should respond_to(:is_admin?) }
|
it { should respond_to(:is_admin?) }
|
||||||
it { should respond_to(:identifier) }
|
it { should respond_to(:identifier) }
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Stubs out all Git repository access done by models so that specs can run
|
# Stubs out all Git repository access done by models so that specs can run
|
||||||
# against fake repositories without Grit complaining that they don't exist.
|
# against fake repositories without Grit complaining that they don't exist.
|
||||||
module StubbedRepository
|
class Project
|
||||||
def path_to_repo
|
def path_to_repo
|
||||||
if new_record? || path == 'newproject'
|
if new_record? || path == 'newproject'
|
||||||
# There are a couple Project specs and features that expect the Project's
|
# There are a couple Project specs and features that expect the Project's
|
||||||
|
@ -27,5 +27,3 @@ module StubbedRepository
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
Project.send(:include, StubbedRepository)
|
|
||||||
|
|
Loading…
Reference in a new issue