diff --git a/features/software_registration.feature b/features/software_registration.feature index 4e61694..71ab290 100644 --- a/features/software_registration.feature +++ b/features/software_registration.feature @@ -79,3 +79,17 @@ Feature: edit public software information Then I should see "Step 2/2 - Software Community Configuration" And I go to /myprofile/new-software/profile_editor/edit Then I should not see "Step 2/2 - Software Community Configuration" + + @selenium + Scenario: Show license link when a license is selected + Given I am on mpog-admin's control panel + And I follow "Create a new software" + And I fill in "community_name" with "another software" + And I fill in "software_info_finality" with "another software finality" + And I select "GPL-2" from "license_info_id" + And I should see "www.gpl2.com" within "#version_link" + And I press "Create" + And I go to another-software's control panel + And I follow "Software Info" + And I select "GPL-3" from "license_info_id" + Then I should see "www.gpl3.com" within "#version_link" \ No newline at end of file diff --git a/lib/tasks/create_lincences.rake b/lib/tasks/create_lincences.rake index 6ebd4fe..69a6db8 100644 --- a/lib/tasks/create_lincences.rake +++ b/lib/tasks/create_lincences.rake @@ -1,7 +1,7 @@ namespace :software do desc "Create software licences" - task :create_licences => :environment do + task :create_licenses => :environment do Environment.all.each do |env| if env.plugin_enabled?("MpogSoftware") or env.plugin_enabled?("MpogSoftwarePlugin") list_file = File.open "plugins/mpog_software/public/static/licences.txt", "r" diff --git a/views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb b/views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb index 3bfcd09..6484565 100644 --- a/views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb +++ b/views/mpog_software_plugin_myprofile/_main_software_editor_extras.html.erb @@ -12,7 +12,7 @@

<%= _("Licenses") %>

- <%= select_tag("license[license_infos_id]", options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => @profile.software_info.license_info_id), :id => "license_info_version") %> + <%= select_tag("license[license_infos_id]", options_for_select(LicenseHelper.getListLicenses.collect{|l| [l.version, l.id]}, :selected => @profile.software_info.license_info_id), :id => "license_info_id") %>

<%= _("License link") %>

-- libgit2 0.21.2