Added some model tests
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2025-08-13 09:57:04 -04:00
parent 3f0efce0d8
commit bd822664b0
7 changed files with 91 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ ENV['APP_ENV'] = 'test'
require_relative '../src/server'
require 'rspec'
require 'rack/test'
require 'database_cleaner/sequel'
# setting this here so all redirect tests can reference the same base URL
BASE_URL = 'http://example.org'
@@ -21,4 +22,15 @@ end
RSpec.configure do |config|
config.include(RSpecMixin)
config.before(:suite) do
DatabaseCleaner.strategy = :truncation
DatabaseCleaner.clean_with(:truncation)
end
config.around(:each) do |suite|
DatabaseCleaner.cleaning do
suite.run
end
end
end