mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 12:12:26 +08:00
add rake task and seed data for discourse_api
This commit is contained in:
parent
7f3797b635
commit
5f124df251
2
db/api_test_seeds.rb
Normal file
2
db/api_test_seeds.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
User.create(name: "Test User", email: "test_user@example.com", password: "password", username: "test_user", approved: true, active: true, auth_token: "39a925803ddc658a68a7e276e558ed62", admin: true)
|
||||
ApiKey.create(key: 'test_d7fd0429940', user_id: 1, created_by_id: 1)
|
|
@ -25,6 +25,11 @@ task 'test:prepare' => 'environment' do
|
|||
SeedFu.seed
|
||||
end
|
||||
|
||||
task 'db:api_test_seed' => 'environment' do
|
||||
puts "Loading test data for discourse_api"
|
||||
load Rails.root + 'db/api_test_seeds.rb'
|
||||
end
|
||||
|
||||
desc 'Rebuild indexes'
|
||||
task 'db:rebuild_indexes' => 'environment' do
|
||||
if Import::backup_tables_count > 0
|
||||
|
|
Loading…
Reference in New Issue
Block a user