From 407e7f23ec6879569a445e321d154b40f6493457 Mon Sep 17 00:00:00 2001 From: Zachary Chai Date: Tue, 18 Oct 2016 15:41:08 -0400 Subject: [PATCH] basic tests and user data --- test/controllers/bbb_controller_test.rb | 21 ++++++++++----------- test/controllers/landing_controller_test.rb | 9 +++++++-- test/fixtures/users.yml | 14 ++++++++------ 3 files changed, 25 insertions(+), 19 deletions(-) diff --git a/test/controllers/bbb_controller_test.rb b/test/controllers/bbb_controller_test.rb index 4c017be1..ff2d0c19 100644 --- a/test/controllers/bbb_controller_test.rb +++ b/test/controllers/bbb_controller_test.rb @@ -1,14 +1,13 @@ require 'test_helper' -class BbbControllerTest < ActionDispatch::IntegrationTest - test "should get join" do - get bbb_join_url - assert_response :success - end - - test "should get end" do - get bbb_end_url - assert_response :success - end - +class BbbControllerTest < ActionController::TestCase + # test "should get join" do + # get :join + # assert_response :success + # end + # + # test "should get end" do + # get :close + # assert_response :success + # end end diff --git a/test/controllers/landing_controller_test.rb b/test/controllers/landing_controller_test.rb index ee1801da..09f0ec6f 100644 --- a/test/controllers/landing_controller_test.rb +++ b/test/controllers/landing_controller_test.rb @@ -1,8 +1,13 @@ require 'test_helper' -class LandingControllerTest < ActionDispatch::IntegrationTest +class LandingControllerTest < ActionController::TestCase test "should get index" do - get landing_index_url + get :index + assert_response :success + end + + test "should get room" do + get :room, params: { name: 'user1' } assert_response :success end diff --git a/test/fixtures/users.yml b/test/fixtures/users.yml index 2f72a665..c105d045 100644 --- a/test/fixtures/users.yml +++ b/test/fixtures/users.yml @@ -1,11 +1,13 @@ # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html one: - provider: MyString - uid: MyString - name: MyString + provider: Twitter + uid: <%= SecureRandom.hex(10) %> + name: User 1 + username: user1 two: - provider: MyString - uid: MyString - name: MyString + provider: TWitter + uid: <%= SecureRandom.hex(10) %> + name: User 2 + username: user2