comparison plugins/redmine_checkout/spec/models/repository_spec.rb @ 1117:b4b72f1eb644 redmine-2.2-integration

Moved all the plugins from the vendor folder to the application root folder.
author luisf <luis.figueira@eecs.qmul.ac.uk>
date Tue, 08 Jan 2013 12:32:05 +0000
parents vendor/plugins/redmine_checkout/spec/models/repository_spec.rb@020926a36823
children
comparison
equal deleted inserted replaced
1116:bb32da3bea34 1117:b4b72f1eb644
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