v1.1.0
This commit is contained in:
parent
6b030fd41d
commit
ba8048d710
15 changed files with 141 additions and 147 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