diff --git a/test/fixtures/dmptemplates.yml b/test/fixtures/dmptemplates.yml index 5e0fa48..0c97051 100644 --- a/test/fixtures/dmptemplates.yml +++ b/test/fixtures/dmptemplates.yml @@ -39,8 +39,9 @@ is_default: true <% 3.times do |n| %> -funder_template_<%= (n == 1 ? 'unpublished' : n + 1) %>: - title: <%= "Funder Template #{(n == 1 ? 'unpublished' : n + 1)}" %> +<% nbr = (n + 1) %> +funder_template_<%= (n == 1 ? 'unpublished' : nbr) %>: + title: <%= "Funder Template #{(n == 1 ? 'unpublished' : nbr)}" %> published: <%= (n != 1) %> organisation: funder locale: en-UK diff --git a/test/fixtures/exported_plans.yml b/test/fixtures/exported_plans.yml index d95c41c..3e8aee6 100644 --- a/test/fixtures/exported_plans.yml +++ b/test/fixtures/exported_plans.yml @@ -1,9 +1,14 @@ +# Specifying the id explicitly here is bad practice but we need to in order to test +# Settings::Dmptemplate. + exported_test_plan_1: + id: 1 plan: test_project_1_plan_1 user: complete_user format: 'pdf' exported_test_plan_2: + id: 2 plan: test_project_2_plan_2 user: complete_user format: 'docx' \ No newline at end of file diff --git a/test/fixtures/plans.yml b/test/fixtures/plans.yml index f29647e..dbd8f76 100644 --- a/test/fixtures/plans.yml +++ b/test/fixtures/plans.yml @@ -1,16 +1,3 @@ -# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/Fixtures.html - -#one: -# locked: false -# project_id: 1 -# version_id: 1 -# -#two: -# locked: false -# project_id: 1 -# version_id: 1 - - test_project_1_plan_1: locked: false project: test_project_1 diff --git a/test/fixtures/settings.yml b/test/fixtures/settings.yml deleted file mode 100644 index 659fc05..0000000 --- a/test/fixtures/settings.yml +++ /dev/null @@ -1,129 +0,0 @@ -plan_list_settings_cc_user: - var: 'plan_list' - value: "--- -columns: !ruby/hash-with-ivars:ActionController::Parameters - elements: - name: '1' - shared: '1' - last_edited: '1' - identifier: '1' - principal_investigator: '1' - ivars: - :@permitted: false -" - target: cc_user - target_type: 'User' - -plan_list_settings_cc_super: - var: 'plan_list' - value: '' - target: cc_super - target_type: 'User' - -export_settings_cc_template: - var: 'export' - value: '--- -formatting: - :font_face: Arial, Helvetica, Sans-Serif - :font_size: 11 - :margin: - :top: 20 - :bottom: 20 - :left: 20 - :right: 20 -max_pages: 10 -' - target: cc_template - target_type: 'Dmptemplate' - -export_settings_test_project_1_plan_1: - var: 'export' - value: "--- -formatting: - :font_face: '\"Times New Roman\", Times, Serif' - :font_size: 10 - :margin: - :top: 20 - :bottom: 20 - :left: 20 - :right: 20 -fields: - :questions: - - 177 - - 176 - - 170 - - 171 - - 173 - - 174 - - 175 - :admin: [] -title: DMP title -" - target: test_project_1_plan_1 - target_type: 'Plan' - -export_settings_test_project_2_plan_2: - var: 'export' - value: "--- -title: 'BIAS: Data Management Plan' -formatting: - :font_face: Arial, Helvetica, Sans-Serif - :font_size: 12 - :margin: - :top: 20 - :bottom: 20 - :left: 20 - :right: 20 -fields: - :admin: - - :project_name - - :project_identifier - - :grant_title - - :principal_investigator - - :project_data_contact - - :project_description - - :funder - - :institution - :questions: - - 176 - - 170 - - 171 - - 173 - - 174 - - 175 -" - target: test_project_2_plan_2 - target_type: 'Plan' - -export_settings_test_project_3_plan_3: - var: 'export' - value: "{}" - target: test_project_3_plan_3 - target_type: 'Plan' - -export_settings_exported_test_plan_1: - var: 'export' - value: '--- -formatting: - :font_face: Arial, Helvetica, Sans-Serif - :font_size: 12 - :margin: - :top: 18 - :bottom: 18 - :left: 20 - :right: 20 -max_pages: 3 -fields: - :questions: - - 176 - - 170 - - 171 - - 173 - - 174 - - 175 - :admin: [] -title: Data management plan for the Academy of Finland September 2016 call -' - target: exported_test_plan_1 - target_type: 'ExportedPlan' - diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 250a3fc..2ca70e1 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -20,7 +20,6 @@ # Import organisation_types.yml and roles.yml <% organisation_types = YAML::load(ERB.new(File.read('./test/fixtures/organisation_types.yml')).result) %> - cc_super: firstname: 'Curation Centre' surname: 'Super Admin'