introduce Enum

This commit is contained in:
Gosha Arinich
2013-03-01 15:07:44 +03:00
parent 0c8c41b131
commit 0c99dea153
45 changed files with 242 additions and 216 deletions

View File

@@ -1,18 +1,18 @@
Fabricator(:notification) do
notification_type Notification.Types[:mentioned]
notification_type Notification.types[:mentioned]
data '{"poison":"ivy","killer":"croc"}'
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end
Fabricator(:quote_notification, from: :notification) do
notification_type Notification.Types[:quoted]
notification_type Notification.types[:quoted]
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end
Fabricator(:private_message_notification, from: :notification) do
notification_type Notification.Types[:private_message]
notification_type Notification.types[:private_message]
user
topic {|attrs| Fabricate(:topic, user: attrs[:user] ) }
end

View File

@@ -3,7 +3,7 @@ Fabricator(:user) do
username { sequence(:username) { |i| "bruce#{i}" } }
email { sequence(:email) { |i| "bruce#{i}@wayne.com" } }
password 'myawesomepassword'
trust_level TrustLevel.Levels[:basic]
trust_level TrustLevel.levels[:basic]
bio_raw "I'm batman!"
end
@@ -32,7 +32,7 @@ Fabricator(:moderator, from: :user) do
name 'A. Moderator'
username 'moderator'
email 'moderator@discourse.org'
trust_level TrustLevel.Levels[:moderator]
trust_level TrustLevel.levels[:moderator]
end
Fabricator(:admin, from: :user) do