X-Git-Url: http://git.kpe.io/?p=clsql.git;a=blobdiff_plain;f=tests%2Fds-employees.lisp;h=26110534d1d8c9b47b866f728f8be52b37ea29e7;hp=7c11874617b3957e08f5a8814d9abd46c1e54a25;hb=c1d990950afa607b9d7e428da384b057fd5c74f3;hpb=2645bad6c8673a32408801e7ea1f8a02a1583d7d diff --git a/tests/ds-employees.lisp b/tests/ds-employees.lisp index 7c11874..2611053 100644 --- a/tests/ds-employees.lisp +++ b/tests/ds-employees.lisp @@ -14,11 +14,13 @@ (defparameter employee10 nil) (defparameter address1 nil) (defparameter address2 nil) +(defparameter address3 nil) (defparameter employee-address1 nil) (defparameter employee-address2 nil) (defparameter employee-address3 nil) (defparameter employee-address4 nil) (defparameter employee-address5 nil) +(defparameter employee-address6 nil) (defclass thing () ((extraterrestrial :initform nil :initarg :extraterrestrial))) @@ -43,6 +45,10 @@ :db-constraints :not-null :type integer :initarg :groupid) + (title + :accessor title + :type symbol + :initarg :title) (first-name :accessor first-name :type (varchar 30) @@ -175,13 +181,8 @@ (defun initialize-ds-employees () ;; (start-sql-recording :type :both) - (let ((*backend-warning-behavior* - (if (member *test-database-type* '(:postgresql :postgresql-socket)) - :ignore - :warn))) - (mapc #'clsql:create-view-from-class - '(employee company address employee-address))) - + (mapc #'clsql:create-view-from-class + '(employee company address employee-address)) (setq *test-start-utime* (get-universal-time)) (let* ((*db-auto-sync* t) @@ -195,6 +196,7 @@ :emplid 1 :groupid 1 :married t + :title 'supplicant :height (1+ (random 1.00)) :bd-utime *test-start-utime* :birthday now-time @@ -205,6 +207,7 @@ employee2 (make-instance 'employee :emplid 2 :groupid 1 + :title :adherent :height (1+ (random 1.00)) :married t :bd-utime *test-start-utime* @@ -217,6 +220,7 @@ employee3 (make-instance 'employee :emplid 3 :groupid 1 + :title 'cl-user::novice :height (1+ (random 1.00)) :married t :bd-utime *test-start-utime* @@ -318,6 +322,8 @@ :postal-code 123) address2 (make-instance 'address :addressid 2) + address3 (make-instance 'address + :addressid 3) employee-address1 (make-instance 'employee-address :emplid 1 :addressid 1 @@ -336,7 +342,10 @@ :verified nil) employee-address5 (make-instance 'employee-address :emplid 3 - :addressid 2))) + :addressid 2) + employee-address6 (make-instance 'employee-address + :emplid 4 + :addressid 3))) ;; sleep to ensure birthdays are no longer at current time ;(sleep 1) ;want to find the test that depends on it, put the sleep there.