Commit 9a696e6ef341e12a7bfbb8e5e4feee4a628a95d6
1 parent
6c9215c3
Exists in
master
and in
29 other branches
ActionItem428: added enabled field to profiles
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1991 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
16 additions
and
1 deletions
Show diff stats
db/schema.rb
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | # |
10 | 10 | # It's strongly recommended to check this file into your version control system. |
11 | 11 | |
12 | -ActiveRecord::Schema.define(:version => 39) do | |
12 | +ActiveRecord::Schema.define(:version => 41) do | |
13 | 13 | |
14 | 14 | create_table "article_versions", :force => true do |t| |
15 | 15 | t.integer "article_id" |
... | ... | @@ -186,6 +186,7 @@ ActiveRecord::Schema.define(:version => 39) do |
186 | 186 | t.float "lat" |
187 | 187 | t.float "lng" |
188 | 188 | t.integer "geocode_precision" |
189 | + t.boolean "enabled", :default => true | |
189 | 190 | end |
190 | 191 | |
191 | 192 | create_table "region_validators", :id => false, :force => true do |t| | ... | ... |
test/unit/profile_test.rb
... | ... | @@ -537,6 +537,11 @@ class ProfileTest < Test::Unit::TestCase |
537 | 537 | assert_includes Profile.find_by_contents('interesting'), p |
538 | 538 | end |
539 | 539 | |
540 | + should 'enabled by default on creation' do | |
541 | + profile = Profile.create!(:name => 'my test profile', :identifier => 'mytestprofile') | |
542 | + assert profile.enabled? | |
543 | + end | |
544 | + | |
540 | 545 | private |
541 | 546 | |
542 | 547 | def assert_invalid_identifier(id) | ... | ... |