Diff
Modified: trunk/test/fixtures/blobs.yml (2251 => 2252)
--- trunk/test/fixtures/blobs.yml 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/fixtures/blobs.yml 2009-07-30 11:57:36 UTC (rev 2252)
@@ -8,7 +8,7 @@
title: Picture
body: some text
created_at: 2008-04-22 15:32:01
- license: by-sa
+ license_id: 1
content_type_id: 1
content_blob_id: 1
@@ -20,6 +20,7 @@
title: developers.txt
body: myExperiment instructions
created_at: 2007-01-01 00:00:03
+ license_id: 1
content_type_id: 2
content_blob_id: 2
@@ -31,7 +32,7 @@
title: for true policy
body: some text
created_at: 2008-04-22 15:32:01
- license: by-sa
+ license_id: 1
content_type_id: 1
content_blob_id: 1
@@ -43,7 +44,7 @@
title: for false policy
body: some text
created_at: 2008-04-22 15:32:01
- license: by-sa
+ license_id: 1
content_type_id: 1
content_blob_id: 1
@@ -55,7 +56,7 @@
title: for protected policy
body: some text
created_at: 2008-04-22 15:32:01
- license: by-sa
+ license_id: 2
content_type_id: 1
content_blob_id: 1
@@ -67,7 +68,7 @@
title: for public policy
body: some text
created_at: 2008-04-22 15:32:01
- license: by-sa
+ license_id: 2
content_type_id: 1
content_blob_id: 1
Modified: trunk/test/fixtures/licenses.yml (2251 => 2252)
--- trunk/test/fixtures/licenses.yml 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/fixtures/licenses.yml 2009-07-30 11:57:36 UTC (rev 2252)
@@ -1,5 +1,11 @@
# Read about fixtures at http://ar.rubyonrails.org/classes/Fixtures.html
-one:
+
+license_1:
id: 1
-two:
+ title: License 1
+ description: This is the first license.
+
+license_2:
id: 2
+ title: License 2
+ description: This is the second license.
Modified: trunk/test/fixtures/workflows.yml (2251 => 2252)
--- trunk/test/fixtures/workflows.yml 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/fixtures/workflows.yml 2009-07-30 11:57:36 UTC (rev 2252)
@@ -10,7 +10,7 @@
body: Gets todays dilbert cartoon
created_at: 2008-02-14 20:19:18
updated_at: 2008-02-14 20:19:18
- license: by-sa
+ license_id: 1
current_version: 1
content_type_id: 3
content_blob_id: 3
@@ -26,7 +26,7 @@
body: Does something, probably chooses a branch based on a condition...
created_at: 2008-04-11 22:19:33
updated_at: 2008-05-14 06:45:08
- license: by-sa
+ license_id: 2
current_version: 1
content_type_id: 3
content_blob_id: 4
Modified: trunk/test/functional/authorization_test.rb (2251 => 2252)
--- trunk/test/functional/authorization_test.rb 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/functional/authorization_test.rb 2009-07-30 11:57:36 UTC (rev 2252)
@@ -10,7 +10,7 @@
class WorkflowsController; def rescue_action(e) raise e end; end
class AuthorizationTest < Test::Unit::TestCase
- fixtures :workflows, :users, :contributions, :workflow_versions, :content_blobs, :blobs, :packs, :policies, :permissions, :networks, :friendships, :memberships
+ fixtures :workflows, :users, :contributions, :workflow_versions, :content_blobs, :blobs, :packs, :policies, :permissions, :networks, :friendships, :memberships, :licenses
def test_truth
assert true
Modified: trunk/test/functional/blobs_controller_test.rb (2251 => 2252)
--- trunk/test/functional/blobs_controller_test.rb 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/functional/blobs_controller_test.rb 2009-07-30 11:57:36 UTC (rev 2252)
@@ -34,7 +34,7 @@
old_count = Blob.count
login_as(:john)
- post :create, :blob => { :title => 'Test blob', :body => 'test test test', :data ="" fixture_file_upload('files/picture_1.png', 'image/png') },
+ post :create, :blob => { :title => 'Test blob', :body => 'test test test', :license_id => 1, :data ="" fixture_file_upload('files/picture_1.png', 'image/png') },
:credits_me => 'false',
:credits_users => '',
:credits_groups => '',
Deleted: trunk/test/functional/license_controller_test.rb (2251 => 2252)
--- trunk/test/functional/license_controller_test.rb 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/functional/license_controller_test.rb 2009-07-30 11:57:36 UTC (rev 2252)
@@ -1,18 +0,0 @@
-require File.dirname(__FILE__) + '/../test_helper'
-require 'license_controller'
-
-# Re-raise errors caught by the controller.
-class LicenseController; def rescue_action(e) raise e end; end
-
-class LicenseControllerTest < Test::Unit::TestCase
- def setup
- @controller = LicenseController.new
- @request = ActionController::TestRequest.new
- @response = ActionController::TestResponse.new
- end
-
- # Replace this with your real tests.
- def test_truth
- assert true
- end
-end
Copied: trunk/test/functional/licenses_controller_test.rb (from rev 2251, trunk/test/functional/license_controller_test.rb) (0 => 2252)
--- trunk/test/functional/licenses_controller_test.rb (rev 0)
+++ trunk/test/functional/licenses_controller_test.rb 2009-07-30 11:57:36 UTC (rev 2252)
@@ -0,0 +1,18 @@
+require File.dirname(__FILE__) + '/../test_helper'
+require 'licenses_controller'
+
+# Re-raise errors caught by the controller.
+class LicensesController; def rescue_action(e) raise e end; end
+
+class LicensesControllerTest < Test::Unit::TestCase
+ def setup
+ @controller = LicensesController.new
+ @request = ActionController::TestRequest.new
+ @response = ActionController::TestResponse.new
+ end
+
+ # Replace this with your real tests.
+ def test_truth
+ assert true
+ end
+end
Modified: trunk/test/functional/workflows_controller_test.rb (2251 => 2252)
--- trunk/test/functional/workflows_controller_test.rb 2009-07-29 15:17:03 UTC (rev 2251)
+++ trunk/test/functional/workflows_controller_test.rb 2009-07-30 11:57:36 UTC (rev 2252)
@@ -35,7 +35,7 @@
old_count = Workflow.count
login_as(:john)
- post :create, :workflow => { :file => fixture_file_upload('files/workflow_dilbert.xml'), :license => 'by-sa' },
+ post :create, :workflow => { :file => fixture_file_upload('files/workflow_dilbert.xml'), :license_id => '1' },
:metadata_choice => 'infer',
:credits_me => 'false',
:credits_users => '',