fix #140, commit lil refactor
This commit is contained in:
parent
29e11d1461
commit
1a9531c9a4
5 changed files with 59 additions and 38 deletions
|
@ -4,11 +4,15 @@ describe Project do
|
|||
describe "Associations" do
|
||||
it { should have_many(:users) }
|
||||
it { should have_many(:users_projects) }
|
||||
it { should have_many(:issues) }
|
||||
it { should have_many(:notes) }
|
||||
it { should have_many(:snippets) }
|
||||
end
|
||||
|
||||
describe "Validation" do
|
||||
it { should validate_presence_of(:name) }
|
||||
it { should validate_presence_of(:path) }
|
||||
it { should validate_presence_of(:code) }
|
||||
end
|
||||
|
||||
describe "Respond to" do
|
||||
|
@ -31,6 +35,11 @@ describe Project do
|
|||
it { should respond_to(:commit) }
|
||||
end
|
||||
|
||||
it "should not allow 'gitosis-admin' as repo name" do
|
||||
should allow_value("blah").for(:path)
|
||||
should_not allow_value("gitosis-admin").for(:path)
|
||||
end
|
||||
|
||||
it "should return valid url to repo" do
|
||||
project = Project.new(:path => "somewhere")
|
||||
project.url_to_repo.should == "git@localhost:somewhere.git"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue