Class: Stockpot::DatabaseCleanerController

Inherits:
MainController
  • Object
show all
Defined in:
app/controllers/stockpot/database_cleaner_controller.rb

Instance Method Summary collapse

Methods included from Helper::Errors

#rescue_error, #return_error

Instance Method Details

#indexObject

Clean database before, between, and after tests by clearing Rails and REDIS caches and truncating the active record database.



7
8
9
10
11
# File 'app/controllers/stockpot/database_cleaner_controller.rb', line 7

def index
  clear_cache_and_redis
  clean_database
  render json: { status: 204 }
end