Mercurial > hg > soundsoftware-site
comparison plugins/redmine_checkout/spec/models/repository_spec.rb @ 1484:51364c0cd58f redmine-2.4-integration
Merge from live branch. Still need to merge manually in files overridden by plugins.
author | Chris Cannam |
---|---|
date | Wed, 15 Jan 2014 09:59:14 +0000 |
parents | b4b72f1eb644 |
children |
comparison
equal
deleted
inserted
replaced
1464:261b3d9a4903 | 1484:51364c0cd58f |
---|---|
1 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') | |
2 | |
3 describe Repository do | |
4 fixtures :settings, :repositories | |
5 | |
6 describe "initialize" do | |
7 before(:each) do | |
8 @repo = Repository.new() | |
9 end | |
10 | |
11 it "should properly set default values" do | |
12 @repo.checkout_overwrite?.should be_false | |
13 @repo.checkout_description.should match /Please select the desired protocol below to get the URL/ | |
14 @repo.checkout_display_login?.should be_false # no subversion repo | |
15 @repo.allow_subtree_checkout?.should be_false | |
16 @repo.checkout_protocols.should eql [] | |
17 end | |
18 end | |
19 | |
20 describe "subtree checkout" do | |
21 before(:each) do | |
22 @svn = Repository::Subversion.new | |
23 @git = Repository::Git.new | |
24 end | |
25 it "should be allowed on subversion" do | |
26 @svn.allow_subtree_checkout?.should eql true | |
27 end | |
28 it "should only be possible if checked" do | |
29 | |
30 end | |
31 | |
32 it "should be forbidden on git" do | |
33 @git.allow_subtree_checkout?.should eql false | |
34 end | |
35 end | |
36 | |
37 describe "extensions" do | |
38 before(:each) do | |
39 @repo = Repository::Subversion.new | |
40 end | |
41 | |
42 it "should provide protocols" do | |
43 protocols = @repo.checkout_protocols | |
44 protocols[0].protocol.should eql "Subversion" | |
45 protocols[1].protocol.should eql "SVN+SSH" | |
46 protocols[2].protocol.should eql "Root" | |
47 end | |
48 end | |
49 end |