test/test_helper.rb
# Add more helper methods to be used by all tests here...
Add more helper methods to be used by all tests here
Add more helper methods to be used by all tests here
def discord_fake_login_and_board_create
    OmniAuth.config.test_mode = true
    @player1 = create( :player )
		@player2 = create( :player )
		@board = create( :board, owner: @player1, orf: @player2, wulf: @player1 )
    discord_auth_hash =
      {
        :provider => 'discord',
        :uid => @player1.uid,
        info: {
          name: 'Foo Bar',
        }
      }
    OmniAuth.config.mock_auth[:discord] = OmniAuth::AuthHash.new    discord_auth_hash
    post '/auth/discord'
    follow_redirect!
    @user
  end
def discord_fake_login_and_board_create OmniAuth . config . test_mode = true @player1 = create ( :player ) @player2 = create ( :player ) @board = create ( :board , owner : @player1 , orf : @player2 , wulf : @player1 ) discord_auth_hash = { :provider => 'discord' , :uid => @player1 . uid , info : { name : 'Foo Bar' , } } OmniAuth . config . mock_auth [ :discord ] = OmniAuth :: AuthHash . new discord_auth_hash post '/auth/discord' follow_redirect! @user end
Add more helper methods to be used by all tests here...
Add more helper methods to be used by all tests here ...