diff --git a/app/models/user.rb b/app/models/user.rb new file mode 100644 index 0000000..2b23a08 --- /dev/null +++ b/app/models/user.rb @@ -0,0 +1,35 @@ +class User < ApplicationRecord + validates :name, presence: true + validate :check_length + validate :check_birthday + validate :check_lengthphone + validate :check_phone + + private + def check_lengthphone + if self.phone && self.phone.length!=10 + self.errors.add :lengthphone,"sdt khong hop le" + end + + end + + def check_phone + if self.phone && self.phone[0].to_i != 0 + self.errors.add :phone, "sdt khong co so 0 o dau" + end + end + + + private + def check_length + if self.name && self.name.length<10 + self.errors.add :name, "t0000000en qua ngan" + end + end + + def check_birthday + if self.birthday && (Date.today - 90.years > self.birthday.to_date || Date.today - 7.years < self.birthday.to_date) + self.errors.add :birthday, "be tuoi qua" + end + end +end diff --git a/db/development.sqlite3 b/db/development.sqlite3 index e69de29..8a0e59c 100644 Binary files a/db/development.sqlite3 and b/db/development.sqlite3 differ diff --git a/db/migrate/20170316073624_add_columns_to_user.rb b/db/migrate/20170316073624_add_columns_to_user.rb new file mode 100644 index 0000000..26d9edd --- /dev/null +++ b/db/migrate/20170316073624_add_columns_to_user.rb @@ -0,0 +1,6 @@ +class AddColumnsToUser < ActiveRecord::Migration[5.0] + def change + add_column :users, :phone, :string + add_column :users, :birthday, :date + end +end diff --git a/db/migrate/20170316075247_add_column.rb b/db/migrate/20170316075247_add_column.rb new file mode 100644 index 0000000..48eba84 --- /dev/null +++ b/db/migrate/20170316075247_add_column.rb @@ -0,0 +1,4 @@ +class AddColumn < ActiveRecord::Migration[5.0] + def change + end +end diff --git a/db/schema.rb b/db/schema.rb new file mode 100644 index 0000000..29be32e --- /dev/null +++ b/db/schema.rb @@ -0,0 +1,65 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20170316075247) do + + create_table "checks", force: :cascade do |t| + t.string "name" + t.string "email" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "infopeople", force: :cascade do |t| + t.string "birthday" + t.string "numberphone" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "infos", force: :cascade do |t| + t.string "birthday" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "people", force: :cascade do |t| + t.date "birthday" + t.integer "numberphone" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "testinfos", force: :cascade do |t| + t.string "birthday" + t.integer "numberphone" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "tests", force: :cascade do |t| + t.string "birthday" + t.string "numberphone" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "users", force: :cascade do |t| + t.string "name" + t.string "email" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.string "phone" + t.date "birthday" + end + +end diff --git a/log/development.log b/log/development.log index 0d09687..9352a23 100644 --- a/log/development.log +++ b/log/development.log @@ -1650,3 +1650,238 @@ Processing by StaticPagesController#home as HTML Completed 200 OK in 923ms (Views: 856.4ms | ActiveRecord: 0.0ms) +Started GET "/" for ::1 at 2017-03-15 18:56:34 +0700 +Processing by StaticPagesController#home as HTML + Rendering static_pages/home.html.erb within layouts/application + Rendered static_pages/home.html.erb within layouts/application (16.4ms) + Rendered layouts/_shim.html.erb (0.6ms) + Rendered layouts/_header.html.erb (0.8ms) +Completed 200 OK in 1030ms (Views: 995.2ms | ActiveRecord: 0.0ms) + + +  (1.5ms) CREATE TABLE "schema_migrations" ("version" varchar NOT NULL PRIMARY KEY) +  (1.6ms) CREATE TABLE "ar_internal_metadata" ("key" varchar NOT NULL PRIMARY KEY, "value" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateUsers (20170315122602) +  (0.1ms) begin transaction +  (0.6ms) CREATE TABLE "users" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315122602"]] +  (1.4ms) commit transaction + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.0ms) begin transaction + SQL (0.4ms) INSERT INTO "ar_internal_metadata" ("key", "value", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["key", "environment"], ["value", "development"], ["created_at", 2017-03-15 12:26:19 UTC], ["updated_at", 2017-03-15 12:26:19 UTC]] +  (1.4ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +  (0.3ms) begin transaction + SQL (16.5ms) INSERT INTO "users" ("name", "email", "created_at", "updated_at") VALUES (?, ?, ?, ?) [["name", "Nguyen Chinh"], ["email", "chinh@gmail.com"], ["created_at", 2017-03-15 12:29:00 UTC], ["updated_at", 2017-03-15 12:29:00 UTC]] +  (1.3ms) commit transaction + User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 1], ["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT ? [["id", 5], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT ? [["name", "Nguyen Chinh"], ["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."name" = ? LIMIT ? [["name", "Nguyen Chinh"], ["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.5ms) INSERT INTO "users" ("created_at", "updated_at") VALUES (?, ?) [["created_at", 2017-03-15 12:37:11 UTC], ["updated_at", 2017-03-15 12:37:11 UTC]] +  (1.6ms) commit transaction + User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" DESC LIMIT ? [["LIMIT", 1]] + ActiveRecord::SchemaMigration Load (11.6ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateInfos (20170315162112) +  (0.1ms) begin transaction +  (0.7ms) CREATE TABLE "infos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "birthday" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315162112"]] +  (27.8ms) commit transaction +Migrating to CreateInfopeople (20170315162210) +  (0.1ms) begin transaction +  (0.5ms) CREATE TABLE "infopeople" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "birthday" varchar, "numberphone" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.3ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315162210"]] +  (1.9ms) commit transaction +Migrating to CreateTests (20170315162453) +  (0.1ms) begin transaction +  (0.4ms) CREATE TABLE "tests" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "birthday" varchar, "numberphone" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315162453"]] +  (1.3ms) commit transaction +Migrating to CreateTestinfos (20170315162932) +  (0.1ms) begin transaction +  (0.5ms) CREATE TABLE "testinfos" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "birthday" varchar, "numberphone" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315162932"]] +  (1.3ms) commit transaction + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +Started GET "/" for ::1 at 2017-03-15 23:34:28 +0700 + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Processing by StaticPagesController#home as HTML + Rendering static_pages/home.html.erb within layouts/application + Rendered static_pages/home.html.erb within layouts/application (16.6ms) + Rendered layouts/_shim.html.erb (0.6ms) + Rendered layouts/_header.html.erb (0.8ms) +Completed 200 OK in 1146ms (Views: 1108.2ms | ActiveRecord: 0.0ms) + + + ActiveRecord::SchemaMigration Load (10.5ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreatePeople (20170315164712) +  (0.1ms) begin transaction +  (0.6ms) CREATE TABLE "people" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "birthday" date, "numberphone" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315164712"]] +  (35.1ms) commit transaction + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.0ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (12.6ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateChecks (20170315170014) +  (0.1ms) begin transaction +  (0.5ms) CREATE TABLE "checks" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "name" varchar, "email" varchar, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) + SQL (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170315170014"]] +  (13.9ms) commit transaction + ActiveRecord::InternalMetadata Load (0.2ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.0ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (10.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.1ms) begin transaction +  (0.1ms) rollback transaction + ActiveRecord::SchemaMigration Load (17.0ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.1ms) begin transaction +  (0.1ms) rollback transaction + ActiveRecord::SchemaMigration Load (11.7ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.2ms) begin transaction +  (0.1ms) rollback transaction + ActiveRecord::SchemaMigration Load (9.4ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.2ms) begin transaction +  (0.1ms) rollback transaction + User Load (30.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + ActiveRecord::SchemaMigration Load (12.3ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (7.2ms) SELECT "schema_migrations"."version" FROM "schema_migrations" +  (8.5ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (13.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to CreateHumen (20170315170334) +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (8.7ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + User Load (17.8ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (7.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" +  (5.9ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (0.2ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to AddColumnsToUser (20170316073624) +  (0.1ms) begin transaction +  (14.6ms) ALTER TABLE "users" ADD "phone" varchar +  (0.3ms) ALTER TABLE "users" ADD "birthday" date + SQL (16.4ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170316073624"]] +  (0.9ms) commit transaction + ActiveRecord::InternalMetadata Load (0.4ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.0ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" +Migrating to AddColumn (20170316075247) +  (0.1ms) begin transaction + SQL (0.9ms) INSERT INTO "schema_migrations" ("version") VALUES (?) [["version", "20170316075247"]] +  (0.9ms) commit transaction + ActiveRecord::InternalMetadata Load (0.1ms) SELECT "ar_internal_metadata".* FROM "ar_internal_metadata" WHERE "ar_internal_metadata"."key" = ? LIMIT ? [["key", :environment], ["LIMIT", 1]] +  (0.0ms) begin transaction +  (0.0ms) commit transaction + ActiveRecord::SchemaMigration Load (0.1ms) SELECT "schema_migrations".* FROM "schema_migrations" + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction + SQL (0.6ms) UPDATE "users" SET "updated_at" = ?, "phone" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 07:54:45 UTC], ["phone", "0999999999"], ["id", 1]] +  (1.4ms) commit transaction + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.2ms) begin transaction + SQL (19.0ms) UPDATE "users" SET "updated_at" = ?, "birthday" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 07:58:49 UTC], ["birthday", Fri, 01 Mar 1996], ["id", 1]] +  (1.6ms) commit transaction + User Load (0.3ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + SQL (0.8ms) INSERT INTO "users" ("name", "created_at", "updated_at", "birthday") VALUES (?, ?, ?, ?) [["name", "chinh nguyen duc"], ["created_at", 2017-03-16 08:35:26 UTC], ["updated_at", 2017-03-16 08:35:26 UTC], ["birthday", Fri, 03 Dec 1999]] +  (1.0ms) commit transaction +  (0.1ms) begin transaction + SQL (2.0ms) UPDATE "users" SET "updated_at" = ?, "birthday" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 08:35:53 UTC], ["birthday", Mon, 03 Dec 2001], ["id", 3]] +  (1.0ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "users" SET "updated_at" = ?, "birthday" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 08:37:42 UTC], ["birthday", Wed, 03 Dec 1001], ["id", 3]] +  (1.1ms) commit transaction +  (0.1ms) begin transaction +  (0.2ms) commit transaction +  (0.7ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) begin transaction +  (0.2ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) begin transaction +  (0.2ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.6ms) begin transaction +  (0.1ms) rollback transaction + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.2ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + SQL (0.5ms) UPDATE "users" SET "updated_at" = ?, "birthday" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 09:06:40 UTC], ["birthday", Wed, 12 Dec 1990], ["id", 1]] +  (1.0ms) commit transaction + User Load (12.0ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.2ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + SQL (0.6ms) UPDATE "users" SET "updated_at" = ?, "birthday" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 10:52:49 UTC], ["birthday", Mon, 12 Dec 2005], ["id", 1]] +  (1.1ms) commit transaction +  (0.1ms) begin transaction + SQL (0.3ms) UPDATE "users" SET "updated_at" = ?, "phone" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 10:57:52 UTC], ["phone", "2"], ["id", 1]] +  (1.0ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "users" SET "updated_at" = ?, "phone" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 11:00:39 UTC], ["phone", "0968544847"], ["id", 1]] +  (1.5ms) commit transaction +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "users" SET "updated_at" = ?, "phone" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 11:02:14 UTC], ["phone", "9968544847"], ["id", 1]] +  (1.2ms) commit transaction +  (0.1ms) begin transaction +  (0.1ms) commit transaction + User Load (10.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] + User Load (0.1ms) SELECT "users".* FROM "users" ORDER BY "users"."id" ASC LIMIT ? [["LIMIT", 1]] +  (0.1ms) begin transaction +  (0.1ms) rollback transaction +  (0.1ms) begin transaction + SQL (0.4ms) UPDATE "users" SET "updated_at" = ?, "phone" = ? WHERE "users"."id" = ? [["updated_at", 2017-03-16 11:09:52 UTC], ["phone", "0068544847"], ["id", 1]] +  (1.5ms) commit transaction diff --git a/test/fixtures/checks.yml b/test/fixtures/checks.yml new file mode 100644 index 0000000..5dc4ddf --- /dev/null +++ b/test/fixtures/checks.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + email: MyString + +two: + name: MyString + email: MyString diff --git a/test/fixtures/contacts.yml b/test/fixtures/contacts.yml new file mode 100644 index 0000000..2034661 --- /dev/null +++ b/test/fixtures/contacts.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: + numberphone: 1 + +two: + birthday: + numberphone: 1 diff --git a/test/fixtures/humen.yml b/test/fixtures/humen.yml new file mode 100644 index 0000000..2034661 --- /dev/null +++ b/test/fixtures/humen.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: + numberphone: 1 + +two: + birthday: + numberphone: 1 diff --git a/test/fixtures/infopeople.yml b/test/fixtures/infopeople.yml new file mode 100644 index 0000000..d394db8 --- /dev/null +++ b/test/fixtures/infopeople.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: MyString + numberphone: MyString + +two: + birthday: MyString + numberphone: MyString diff --git a/test/fixtures/infos.yml b/test/fixtures/infos.yml new file mode 100644 index 0000000..d6990fe --- /dev/null +++ b/test/fixtures/infos.yml @@ -0,0 +1,7 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: MyString + +two: + birthday: MyString diff --git a/test/fixtures/people.yml b/test/fixtures/people.yml new file mode 100644 index 0000000..f828002 --- /dev/null +++ b/test/fixtures/people.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: 2017-03-15 + numberphone: 1 + +two: + birthday: 2017-03-15 + numberphone: 1 diff --git a/test/fixtures/testinfos.yml b/test/fixtures/testinfos.yml new file mode 100644 index 0000000..28a4dec --- /dev/null +++ b/test/fixtures/testinfos.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: MyString + numberphone: 1 + +two: + birthday: MyString + numberphone: 1 diff --git a/test/fixtures/tests.yml b/test/fixtures/tests.yml new file mode 100644 index 0000000..d394db8 --- /dev/null +++ b/test/fixtures/tests.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + birthday: MyString + numberphone: MyString + +two: + birthday: MyString + numberphone: MyString diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml new file mode 100644 index 0000000..5dc4ddf --- /dev/null +++ b/test/fixtures/users.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + email: MyString + +two: + name: MyString + email: MyString diff --git a/test/models/check_test.rb b/test/models/check_test.rb new file mode 100644 index 0000000..8756086 --- /dev/null +++ b/test/models/check_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class CheckTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/contact_test.rb b/test/models/contact_test.rb new file mode 100644 index 0000000..ccef1f9 --- /dev/null +++ b/test/models/contact_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class ContactTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/human_test.rb b/test/models/human_test.rb new file mode 100644 index 0000000..2863cbf --- /dev/null +++ b/test/models/human_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class HumanTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/info_test.rb b/test/models/info_test.rb new file mode 100644 index 0000000..c331d5f --- /dev/null +++ b/test/models/info_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class InfoTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/infoperson_test.rb b/test/models/infoperson_test.rb new file mode 100644 index 0000000..8018cbf --- /dev/null +++ b/test/models/infoperson_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class InfopersonTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/person_test.rb b/test/models/person_test.rb new file mode 100644 index 0000000..ad04ed8 --- /dev/null +++ b/test/models/person_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class PersonTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/test_test.rb b/test/models/test_test.rb new file mode 100644 index 0000000..1c99a1d --- /dev/null +++ b/test/models/test_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TestTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/testinfo_test.rb b/test/models/testinfo_test.rb new file mode 100644 index 0000000..3d9d5d3 --- /dev/null +++ b/test/models/testinfo_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class TestinfoTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end diff --git a/test/models/user_test.rb b/test/models/user_test.rb new file mode 100644 index 0000000..82f61e0 --- /dev/null +++ b/test/models/user_test.rb @@ -0,0 +1,7 @@ +require 'test_helper' + +class UserTest < ActiveSupport::TestCase + # test "the truth" do + # assert true + # end +end