Commit 10e3a0935c1f0e3cb17e0ce9791246ed374560df
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
Merge branch 'rails3' into rails3_stable
Showing
4 changed files
with
7 additions
and
7 deletions
Show diff stats
app/models/article.rb
@@ -2,7 +2,7 @@ require 'hpricot' | @@ -2,7 +2,7 @@ require 'hpricot' | ||
2 | 2 | ||
3 | class Article < ActiveRecord::Base | 3 | class Article < ActiveRecord::Base |
4 | 4 | ||
5 | - attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link | 5 | + attr_accessible :name, :body, :abstract, :profile, :tag_list, :parent, :allow_members_to_edit, :translation_of_id, :language, :license_id, :parent_id, :display_posts_in_current_language, :category_ids, :posts_per_page, :moderate_comments, :accept_comments, :feed, :published, :source, :highlighted, :notify_comments, :display_hits, :slug, :external_feed_builder, :display_versions, :external_link, :image_builder |
6 | 6 | ||
7 | acts_as_having_image | 7 | acts_as_having_image |
8 | 8 |
features/manage_users.feature
@@ -15,7 +15,7 @@ Background: | @@ -15,7 +15,7 @@ Background: | ||
15 | Scenario: deactive user | 15 | Scenario: deactive user |
16 | When I follow "Deactivate user" within "tr[title='Joao Silva']" | 16 | When I follow "Deactivate user" within "tr[title='Joao Silva']" |
17 | And I confirm the "Do you want to deactivate this user?" dialog | 17 | And I confirm the "Do you want to deactivate this user?" dialog |
18 | - Then I should see "Activate user" within "tr[title='Joao Silva']" | 18 | + Then the "tr[title='Joao Silva'] td.actions a.icon-activate-user" button should be enabled |
19 | 19 | ||
20 | @selenium | 20 | @selenium |
21 | Scenario: activate user | 21 | Scenario: activate user |
@@ -23,7 +23,7 @@ Background: | @@ -23,7 +23,7 @@ Background: | ||
23 | Given I confirm the "Do you want to deactivate this user?" dialog | 23 | Given I confirm the "Do you want to deactivate this user?" dialog |
24 | When I follow "Activate user" within "tr[title='Paulo Santos']" | 24 | When I follow "Activate user" within "tr[title='Paulo Santos']" |
25 | And I confirm the "Do you want to activate this user?" dialog | 25 | And I confirm the "Do you want to activate this user?" dialog |
26 | - Then I should see "Deactivate user" within "tr[title='Paulo Santos']" | 26 | + Then the "tr[title='Paulo Santos'] td.actions a.icon-deactivate-user" button should be enabled |
27 | 27 | ||
28 | @selenium | 28 | @selenium |
29 | Scenario: remove user | 29 | Scenario: remove user |
@@ -36,7 +36,7 @@ Background: | @@ -36,7 +36,7 @@ Background: | ||
36 | Scenario: admin user | 36 | Scenario: admin user |
37 | When I follow "Set admin role" within "tr[title='Joao Silva']" | 37 | When I follow "Set admin role" within "tr[title='Joao Silva']" |
38 | And I confirm the "Do you want to set this user as administrator?" dialog | 38 | And I confirm the "Do you want to set this user as administrator?" dialog |
39 | - Then I should see "Reset admin role" within "tr[title='Joao Silva']" | 39 | + Then the "tr[title='Joao Silva'] td.actions a.icon-reset-admin-role" button should be enabled |
40 | 40 | ||
41 | @selenium | 41 | @selenium |
42 | Scenario: unadmin user | 42 | Scenario: unadmin user |
@@ -44,4 +44,4 @@ Background: | @@ -44,4 +44,4 @@ Background: | ||
44 | And I confirm the "Do you want to set this user as administrator?" dialog | 44 | And I confirm the "Do you want to set this user as administrator?" dialog |
45 | When I follow "Reset admin role" within "tr[title='Paulo Santos']" | 45 | When I follow "Reset admin role" within "tr[title='Paulo Santos']" |
46 | And I confirm the "Do you want to reset this user as administrator?" dialog | 46 | And I confirm the "Do you want to reset this user as administrator?" dialog |
47 | - Then I should see "Set admin role" within "tr[title='Paulo Santos']" | 47 | + Then the "tr[title='Paulo Santos'] td.actions a.icon-set-admin-role" button should be enabled |
features/support/selenium.rb
@@ -10,7 +10,7 @@ end | @@ -10,7 +10,7 @@ end | ||
10 | 10 | ||
11 | # FIXME: 'DELETE FROM ...' is being ran 3x - see cucumber.log | 11 | # FIXME: 'DELETE FROM ...' is being ran 3x - see cucumber.log |
12 | DatabaseCleaner.clean_with :truncation | 12 | DatabaseCleaner.clean_with :truncation |
13 | -DatabaseCleaner.strategy = :truncation | 13 | +DatabaseCleaner.strategy = :truncation, {:pre_count => true, :reset_ids => false} |
14 | 14 | ||
15 | Before do | 15 | Before do |
16 | DatabaseCleaner.start | 16 | DatabaseCleaner.start |
test/unit/external_feed_test.rb
@@ -142,7 +142,7 @@ class ExternalFeedTest < ActiveSupport::TestCase | @@ -142,7 +142,7 @@ class ExternalFeedTest < ActiveSupport::TestCase | ||
142 | should 'save hour when feed was fetched' do | 142 | should 'save hour when feed was fetched' do |
143 | external_feed = create(:external_feed) | 143 | external_feed = create(:external_feed) |
144 | 144 | ||
145 | - now = Time.parse('2009-01-23 09:35') | 145 | + now = Time.zone.parse('2009-01-23 09:35') |
146 | Time.stubs(:now).returns(now) | 146 | Time.stubs(:now).returns(now) |
147 | 147 | ||
148 | external_feed.finish_fetch | 148 | external_feed.finish_fetch |