diff --git a/features/create_community.feature b/features/create_community.feature index 0c54499..a07dffb 100644 --- a/features/create_community.feature +++ b/features/create_community.feature @@ -17,6 +17,7 @@ Feature: create community And I fill in "Name" with "Fancy community" And I press "Create" Then I should see "Fancy community" + And I should see "Fancy community"'s creation date Scenario: a user creates a community when environment moderates it Given I am logged in as "joaosilva" diff --git a/features/step_definitions/create_community_steps.rb b/features/step_definitions/create_community_steps.rb index 672fb5e..b1a764a 100644 --- a/features/step_definitions/create_community_steps.rb +++ b/features/step_definitions/create_community_steps.rb @@ -1,3 +1,5 @@ +include DatesHelper + Given /^I create community "(.+)"$/ do |community| Given 'I go to the Control panel' click_link('Manage my groups') @@ -21,3 +23,10 @@ Given /^I reject community "(.+)"$/ do |community| choose("decision-cancel-#{task.id}") click_button('Apply!') end + +Then /^I should see "([^\"]*)"'s creation date$/ do |community| + com = Community.find_by_name community + text = "Created at: #{show_date(com.created_at)}" + response.should contain(text) +end + diff --git a/test/functional/memberships_controller_test.rb b/test/functional/memberships_controller_test.rb index 040b2f6..260ddbe 100644 --- a/test/functional/memberships_controller_test.rb +++ b/test/functional/memberships_controller_test.rb @@ -73,13 +73,6 @@ class MembershipsControllerTest < ActionController::TestCase assert_tag :tag => 'li', :content => /Members: 1/ end - should 'show created at on list' do - community = Community.create!(:name => 'my test community') - community.add_member(profile) - get :index, :profile => profile.identifier - assert_tag :tag => 'li', :content => /Created at: #{show_date(community.created_at)}/ - end - should 'show description on list' do community = Community.create!(:name => 'my test community', :description => 'description test') community.add_member(profile) -- libgit2 0.21.2