diff --git a/Pearlception/config/database.yml b/Pearlception/config/database.yml index 6d149be..44aecc7 100644 --- a/Pearlception/config/database.yml +++ b/Pearlception/config/database.yml @@ -21,9 +21,9 @@ stats_development: &stats adapter: mysql2 encoding: utf8 pool: 5 - username: ivauser - password: <%= ENV['DB_PASS'] %> - host: taylors.c02zesysnssi.us-west-2.rds.amazonaws.com + username: <%= ENV['STATS_DB_USER'] %> + password: <%= ENV['STATS_DB_PASS'] %> + host: <%= ENV['STATS_DB_URL'] %> port: 3306 database: main diff --git a/Pearlception/test/models/oyster_test.rb b/Pearlception/test/models/oyster_test.rb index c29d260..ff3bd27 100644 --- a/Pearlception/test/models/oyster_test.rb +++ b/Pearlception/test/models/oyster_test.rb @@ -1,9 +1,17 @@ require 'test_helper' class OysterTest < ActiveSupport::TestCase - test "the_truth" do - f = Oyster.first - puts f.inspect + + test "check_connection" do + Oyster.connection assert true end + + test "get_first_oyster" do + first = Oyster.first + id = first.oyster_id == 1 + run = first.run_id == 257 + grade = first.grade == "Rej" + assert id && run && grade + end end