diff test/functional/.svn/text-base/repositories_subversion_controller_test.rb.svn-base @ 441:cbce1fd3b1b7 redmine-1.2

Update to Redmine 1.2-stable branch (Redmine SVN rev 6000)
author Chris Cannam
date Mon, 06 Jun 2011 14:24:13 +0100
parents 051f544170fe
children
line wrap: on
line diff
--- a/test/functional/.svn/text-base/repositories_subversion_controller_test.rb.svn-base	Thu Mar 03 11:42:28 2011 +0000
+++ b/test/functional/.svn/text-base/repositories_subversion_controller_test.rb.svn-base	Mon Jun 06 14:24:13 2011 +0100
@@ -1,16 +1,16 @@
-# redMine - project management software
-# Copyright (C) 2006-2008  Jean-Philippe Lang
+# Redmine - project management software
+# Copyright (C) 2006-2011  Jean-Philippe Lang
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
 # as published by the Free Software Foundation; either version 2
 # of the License, or (at your option) any later version.
-# 
+#
 # This program is distributed in the hope that it will be useful,
 # but WITHOUT ANY WARRANTY; without even the implied warranty of
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 # GNU General Public License for more details.
-# 
+#
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
@@ -37,7 +37,7 @@
 
     @project = Project.find(PRJ_ID)
     @repository = Repository::Subversion.create(:project => @project,
-               :url => "file://#{self.class.repository_path('subversion')}")
+               :url => self.class.subversion_repository_url)
     assert @repository
   end
 
@@ -51,7 +51,7 @@
       assert_not_nil assigns(:entries)
       assert_not_nil assigns(:changesets)
     end
-    
+
     def test_browse_root
       @repository.fetch_changesets
       @repository.reload
@@ -62,7 +62,7 @@
       entry = assigns(:entries).detect {|e| e.name == 'subversion_test'}
       assert_equal 'dir', entry.kind
     end
-    
+
     def test_browse_directory
       @repository.fetch_changesets
       @repository.reload
@@ -70,7 +70,8 @@
       assert_response :success
       assert_template 'show'
       assert_not_nil assigns(:entries)
-      assert_equal ['[folder_with_brackets]', 'folder', '.project', 'helloworld.c', 'textfile.txt'], assigns(:entries).collect(&:name)
+      assert_equal ['[folder_with_brackets]', 'folder', '.project', 'helloworld.c', 'textfile.txt'],
+                   assigns(:entries).collect(&:name)
       entry = assigns(:entries).detect {|e| e.name == 'helloworld.c'}
       assert_equal 'file', entry.kind
       assert_equal 'subversion_test/helloworld.c', entry.path
@@ -84,20 +85,21 @@
       assert_response :success
       assert_template 'show'
       assert_not_nil assigns(:entries)
-      assert_equal ['folder', '.project', 'helloworld.c', 'helloworld.rb', 'textfile.txt'], assigns(:entries).collect(&:name)
+      assert_equal ['folder', '.project', 'helloworld.c', 'helloworld.rb', 'textfile.txt'],
+                   assigns(:entries).collect(&:name)
     end
-    
+
     def test_file_changes
       @repository.fetch_changesets
       @repository.reload
       get :changes, :id => PRJ_ID, :path => ['subversion_test', 'folder', 'helloworld.rb' ]
       assert_response :success
       assert_template 'changes'
-      
+
       changesets = assigns(:changesets)
       assert_not_nil changesets
       assert_equal %w(6 3 2), changesets.collect(&:revision)
-      
+
       # svn properties displayed with svn >= 1.5 only
       if Redmine::Scm::Adapters::SubversionAdapter.client_version_above?([1, 5, 0])
         assert_not_nil assigns(:properties)
@@ -115,12 +117,12 @@
       get :changes, :id => PRJ_ID, :path => ['subversion_test', 'folder' ]
       assert_response :success
       assert_template 'changes'
-      
+
       changesets = assigns(:changesets)
       assert_not_nil changesets
       assert_equal %w(10 9 7 6 5 2), changesets.collect(&:revision)
     end
-      
+
     def test_entry
       @repository.fetch_changesets
       @repository.reload
@@ -128,7 +130,7 @@
       assert_response :success
       assert_template 'entry'
     end
-      
+
     def test_entry_should_send_if_too_big
       @repository.fetch_changesets
       @repository.reload
@@ -140,7 +142,7 @@
         assert_equal 'attachment; filename="helloworld.c"', @response.headers['Content-Disposition']
       end
     end
-    
+
     def test_entry_at_given_revision
       @repository.fetch_changesets
       @repository.reload
@@ -151,7 +153,7 @@
       assert_tag :tag => 'td', :attributes => { :class => /line-code/},
                                :content => /Here's the code/
     end
-    
+
     def test_entry_not_found
       @repository.fetch_changesets
       @repository.reload
@@ -159,7 +161,7 @@
       assert_tag :tag => 'p', :attributes => { :id => /errorExplanation/ },
                                 :content => /The entry or revision was not found in the repository/
     end
-  
+
     def test_entry_download
       @repository.fetch_changesets
       @repository.reload
@@ -168,7 +170,7 @@
       assert_template ''
       assert_equal 'attachment; filename="helloworld.c"', @response.headers['Content-Disposition']
     end
-    
+
     def test_directory_entry
       @repository.fetch_changesets
       @repository.reload
@@ -178,7 +180,7 @@
       assert_not_nil assigns(:entry)
       assert_equal 'folder', assigns(:entry).name
     end
-    
+
     # TODO: this test needs fixtures.
     def test_revision
       @repository.fetch_changesets
@@ -189,17 +191,17 @@
       assert_tag :tag => 'ul',
                  :child => { :tag => 'li',
                              # link to the entry at rev 2
-                             :child => { :tag => 'a', 
+                             :child => { :tag => 'a',
                                          :attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/test/some/path/in/the/repo'},
                                          :content => 'repo',
                                          # link to partial diff
-                                         :sibling =>  { :tag => 'a', 
-                                                        :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo' } 
+                                         :sibling =>  { :tag => 'a',
+                                                        :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/test/some/path/in/the/repo' }
                                                        }
                                         }
                             }
     end
-    
+
     def test_invalid_revision
       @repository.fetch_changesets
       @repository.reload
@@ -229,24 +231,24 @@
       r = Project.find(1).repository
       # Changes repository url to a subdirectory
       r.update_attribute :url, (r.url + '/test/some')
-      
+
       get :revision, :id => 1, :rev => 2
       assert_response :success
       assert_template 'revision'
       assert_tag :tag => 'ul',
                  :child => { :tag => 'li',
                              # link to the entry at rev 2
-                             :child => { :tag => 'a', 
+                             :child => { :tag => 'a',
                                          :attributes => {:href => '/projects/ecookbook/repository/revisions/2/entry/path/in/the/repo'},
                                          :content => 'repo',
                                          # link to partial diff
-                                         :sibling =>  { :tag => 'a', 
-                                                        :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo' } 
+                                         :sibling =>  { :tag => 'a',
+                                                        :attributes => { :href => '/projects/ecookbook/repository/revisions/2/diff/path/in/the/repo' }
                                                        }
                                         }
                             }
     end
-    
+
     def test_revision_diff
       @repository.fetch_changesets
       @repository.reload
@@ -263,7 +265,7 @@
       get :diff, :id => PRJ_ID, :rev => 6, :rev_to => 2, :path => ['subversion_test', 'folder']
       assert_response :success
       assert_template 'diff'
-      
+
       diff = assigns(:diff)
       assert_not_nil diff
       # 2 files modified
@@ -271,7 +273,7 @@
 
       assert_tag :tag => 'h2', :content => /2:6/
     end
-    
+
     def test_annotate
       @repository.fetch_changesets
       @repository.reload