diff --git a/app/helpers/repository_helper.rb b/app/helpers/repository_helper.rb index ffb45ee..8423fcf 100644 --- a/app/helpers/repository_helper.rb +++ b/app/helpers/repository_helper.rb @@ -8,6 +8,10 @@ module RepositoryHelper end def periodicity_option(periodicity) - periodicity_options.select {|option| option.last == periodicity}.first.first + periodicity_label = periodicity_options.select {|option| option.last == periodicity}.first + unless periodicity_label.nil? + return periodicity_label.first + end + return "Undefined" end end \ No newline at end of file diff --git a/features/repository/show.feature b/features/repository/show.feature index 5cd905c..d24ce8a 100644 --- a/features/repository/show.feature +++ b/features/repository/show.feature @@ -3,7 +3,7 @@ Feature: Show Repository As a regular user I should see it's informations - @kalibro_restart @javascript @wip + @kalibro_restart @javascript Scenario: Testing the repository values Given I have a sample project And I have a sample configuration with native metrics diff --git a/features/step_definitions/repository_steps.rb b/features/step_definitions/repository_steps.rb index ce03988..2ddaa19 100644 --- a/features/step_definitions/repository_steps.rb +++ b/features/step_definitions/repository_steps.rb @@ -102,6 +102,9 @@ Then(/^I should see the given repository's content$/) do page.should have_content(@repository.description) page.should have_content(@repository.name) page.should have_content(@repository.license) + page.should have_content(@repository.address) + page.should have_content(@configuration.name) + page.should have_content("1 day") # The given repository periodicity end Then(/^I should see a loaded graphic for the sample metric$/) do -- libgit2 0.21.2