Skip to content

Commit

Permalink
add rake task and seed data for discourse_api
Browse files Browse the repository at this point in the history
  • Loading branch information
oblakeerickson committed Sep 11, 2014
1 parent 7f3797b commit 5f124df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions db/api_test_seeds.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
User.create(name: "Test User", email: "[email protected]", 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)
5 changes: 5 additions & 0 deletions lib/tasks/db.rake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 5f124df

Please sign in to comment.