Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--data/eula.test.license1
-rw-r--r--test/fixtures/users.yml2
-rw-r--r--test/functional/licenses_controller_test.rb8
-rw-r--r--test/functional/projects_controller_test.rb3
-rw-r--r--test/unit/end_user_license_agreement_test.rb4
5 files changed, 6 insertions, 12 deletions
diff --git a/data/eula.test.license b/data/eula.test.license
new file mode 100644
index 0000000..d4c43b8
--- /dev/null
+++ b/data/eula.test.license
@@ -0,0 +1 @@
+Do not edit this file \ No newline at end of file
diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml
index 0bda978..c2e9485 100644
--- a/test/fixtures/users.yml
+++ b/test/fixtures/users.yml
@@ -10,7 +10,7 @@ johan:
ssh_key_id: 1
is_admin: <%= true %>
aasm_state: terms_accepted
- accepted_license_agreement_version: 213
+ accepted_license_agreement_version: 66c070833243bb8cf061bdc4165a29a8c8688ace # the checksum of the contents of data/gitorious.test.license
moe:
id: 2
login: moe
diff --git a/test/functional/licenses_controller_test.rb b/test/functional/licenses_controller_test.rb
index 5964e19..3cb1733 100644
--- a/test/functional/licenses_controller_test.rb
+++ b/test/functional/licenses_controller_test.rb
@@ -22,12 +22,8 @@ require File.dirname(__FILE__) + '/../test_helper'
class LicensesControllerTest < ActionController::TestCase
context 'Accepting (current) end user license agreement' do
setup do
- license = stub("End user license agreement")
- license.stubs(:checksum).returns("ff0023902")
- license.stubs(:contents).returns("Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.")
- EndUserLicenseAgreement.stubs(:current_version).returns(license)
- @user = users(:johan)
- login_as :johan
+ @user = users(:moe)
+ login_as :moe
end
should 'render the current license version if this has been accepted' do
diff --git a/test/functional/projects_controller_test.rb b/test/functional/projects_controller_test.rb
index 8537466..0f712e8 100644
--- a/test/functional/projects_controller_test.rb
+++ b/test/functional/projects_controller_test.rb
@@ -24,9 +24,6 @@ require File.dirname(__FILE__) + '/../test_helper'
class ProjectsControllerTest < ActionController::TestCase
def setup
- license = mock("End user license agreement")
- license.stubs(:checksum).returns("213")
- EndUserLicenseAgreement.stubs(:current_version).returns(license)
@project = projects(:johans)
end
diff --git a/test/unit/end_user_license_agreement_test.rb b/test/unit/end_user_license_agreement_test.rb
index 00de9d7..c6a7b7d 100644
--- a/test/unit/end_user_license_agreement_test.rb
+++ b/test/unit/end_user_license_agreement_test.rb
@@ -21,11 +21,11 @@ require File.dirname(__FILE__) + '/../test_helper'
class EndUserLicenseAgreementTest < ActiveSupport::TestCase
context 'The end user license agreement' do
setup do
- File.open(EndUserLicenseAgreement.filename, "w"){|f| f.write("This is the license")}
+# File.open(EndUserLicenseAgreement.filename, "w"){|f| f.write("This is the license")}
end
teardown do
- FileUtils.rm(EndUserLicenseAgreement.filename) if File.exist?(EndUserLicenseAgreement.filename)
+# FileUtils.rm(EndUserLicenseAgreement.filename) if File.exist?(EndUserLicenseAgreement.filename)
EndUserLicenseAgreement.reset
end