Mercurial > hg > soundsoftware-site
annotate plugins/redmine_checkout/spec/models/repository_spec.rb @ 1600:ed9c467ef922 dockerise
Add hggit extension
author | Chris Cannam |
---|---|
date | Wed, 23 Aug 2017 11:32:50 +0100 |
parents | b4b72f1eb644 |
children |
rev | line source |
---|---|
Chris@16 | 1 require File.expand_path(File.dirname(__FILE__) + '/../spec_helper') |
Chris@16 | 2 |
Chris@16 | 3 describe Repository do |
Chris@16 | 4 fixtures :settings, :repositories |
Chris@16 | 5 |
Chris@16 | 6 describe "initialize" do |
Chris@16 | 7 before(:each) do |
Chris@16 | 8 @repo = Repository.new() |
Chris@16 | 9 end |
Chris@16 | 10 |
Chris@16 | 11 it "should properly set default values" do |
Chris@16 | 12 @repo.checkout_overwrite?.should be_false |
Chris@16 | 13 @repo.checkout_description.should match /Please select the desired protocol below to get the URL/ |
Chris@16 | 14 @repo.checkout_display_login?.should be_false # no subversion repo |
Chris@16 | 15 @repo.allow_subtree_checkout?.should be_false |
Chris@16 | 16 @repo.checkout_protocols.should eql [] |
Chris@16 | 17 end |
Chris@16 | 18 end |
Chris@16 | 19 |
Chris@16 | 20 describe "subtree checkout" do |
Chris@16 | 21 before(:each) do |
Chris@16 | 22 @svn = Repository::Subversion.new |
Chris@16 | 23 @git = Repository::Git.new |
Chris@16 | 24 end |
Chris@16 | 25 it "should be allowed on subversion" do |
Chris@16 | 26 @svn.allow_subtree_checkout?.should eql true |
Chris@16 | 27 end |
Chris@16 | 28 it "should only be possible if checked" do |
Chris@16 | 29 |
Chris@16 | 30 end |
Chris@16 | 31 |
Chris@16 | 32 it "should be forbidden on git" do |
Chris@16 | 33 @git.allow_subtree_checkout?.should eql false |
Chris@16 | 34 end |
Chris@16 | 35 end |
Chris@16 | 36 |
Chris@16 | 37 describe "extensions" do |
Chris@16 | 38 before(:each) do |
Chris@16 | 39 @repo = Repository::Subversion.new |
Chris@16 | 40 end |
Chris@16 | 41 |
Chris@16 | 42 it "should provide protocols" do |
Chris@16 | 43 protocols = @repo.checkout_protocols |
Chris@16 | 44 protocols[0].protocol.should eql "Subversion" |
Chris@16 | 45 protocols[1].protocol.should eql "SVN+SSH" |
Chris@16 | 46 protocols[2].protocol.should eql "Root" |
Chris@16 | 47 end |
Chris@16 | 48 end |
Chris@16 | 49 end |