Commit 7d93627a1e8b9604fbb1c6eeac29542b7c1870bf
1 parent
10f091ec
Exists in
master
and in
29 other branches
Fixed failing tests
Showing
2 changed files
with
18 additions
and
16 deletions
Show diff stats
features/edit_environment_templates.feature
| 1 | 1 | Feature: edit environment templates |
| 2 | 2 | As an administrator |
| 3 | - I want edit templates | |
| 3 | + I want to edit templates | |
| 4 | 4 | |
| 5 | 5 | Background: |
| 6 | 6 | Given that the default environment have all profile templates |
| ... | ... | @@ -9,37 +9,37 @@ Feature: edit environment templates |
| 9 | 9 | Given I am logged in as admin |
| 10 | 10 | When I follow "Administration" |
| 11 | 11 | And I follow "Edit Templates" |
| 12 | - Then I should see "Edit Person Template" link | |
| 13 | - And I should see "Edit Community Template" link | |
| 14 | - And I should see "Edit Enterprise Template" link | |
| 15 | - And I should see "Edit Inactive Enterprise Template" link | |
| 12 | + Then I should see "Person template" link | |
| 13 | + And I should see "Community template" link | |
| 14 | + And I should see "Enterprise template" link | |
| 15 | + And I should see "Inactive Enterprise template" link | |
| 16 | 16 | |
| 17 | 17 | Scenario: Go to control panel of person template |
| 18 | 18 | Given I am logged in as admin |
| 19 | 19 | When I follow "Administration" |
| 20 | 20 | And I follow "Edit Templates" |
| 21 | - And I follow "Edit Person Template" | |
| 21 | + And I follow "Person template" | |
| 22 | 22 | Then I should be on Person template's control panel |
| 23 | 23 | |
| 24 | 24 | Scenario: Go to control panel of enterprise template |
| 25 | 25 | Given I am logged in as admin |
| 26 | 26 | When I follow "Administration" |
| 27 | 27 | And I follow "Edit Templates" |
| 28 | - And I follow "Edit Enterprise Template" | |
| 28 | + And I follow "Enterprise template" | |
| 29 | 29 | Then I should be on Enterprise template's control panel |
| 30 | 30 | |
| 31 | 31 | Scenario: Go to control panel of inactive enterprise template |
| 32 | 32 | Given I am logged in as admin |
| 33 | 33 | When I follow "Administration" |
| 34 | 34 | And I follow "Edit Templates" |
| 35 | - And I follow "Edit Inactive Enterprise Template" | |
| 35 | + And I follow "Inactive enterprise template" | |
| 36 | 36 | Then I should be on Inactive Enterprise template's control panel |
| 37 | 37 | |
| 38 | 38 | Scenario: Go to control panel of community template |
| 39 | 39 | Given I am logged in as admin |
| 40 | 40 | When I follow "Administration" |
| 41 | 41 | And I follow "Edit Templates" |
| 42 | - And I follow "Edit Community Template" | |
| 42 | + And I follow "Community template" | |
| 43 | 43 | Then I should be on Community template's control panel |
| 44 | 44 | |
| 45 | 45 | Scenario: Not see link to edit an unexistent template |
| ... | ... | @@ -47,7 +47,7 @@ Feature: edit environment templates |
| 47 | 47 | And I am logged in as admin |
| 48 | 48 | When I follow "Administration" |
| 49 | 49 | And I follow "Edit Templates" |
| 50 | - Then I should see "Edit Person Template" link | |
| 51 | - And I should see "Edit Community Template" link | |
| 52 | - And I should see "Edit Enterprise Template" link | |
| 53 | - And I should not see "Edit Inactive Enterprise Template" link | |
| 50 | + Then I should see "Person template" link | |
| 51 | + And I should see "Community template" link | |
| 52 | + And I should see "Enterprise template" link | |
| 53 | + And I should not see "Inactive enterprise template" link | ... | ... |
test/unit/comment_test.rb
| ... | ... | @@ -400,10 +400,12 @@ class CommentTest < ActiveSupport::TestCase |
| 400 | 400 | should 'update article activity when add a comment' do |
| 401 | 401 | profile = create_user('testuser').person |
| 402 | 402 | article = create(TinyMceArticle, :profile => profile) |
| 403 | - action = article.activity | |
| 404 | - time = action.updated_at | |
| 405 | 403 | |
| 406 | - Time.stubs(:now).returns(time + 1.day) | |
| 404 | + ActionTracker::Record.record_timestamps = false | |
| 405 | + article.activity.update_attribute(:updated_at, Time.now - 1.day) | |
| 406 | + ActionTracker::Record.record_timestamps = true | |
| 407 | + | |
| 408 | + time = article.activity.updated_at | |
| 407 | 409 | |
| 408 | 410 | comment = create(Comment, :source => article, :author => profile) |
| 409 | 411 | assert_equal time + 1.day, article.activity.updated_at | ... | ... |