Sha256: 1e6f4d9f2c66fbceb40027b9c447aa3e8e8e4b72215867896d678c6962b204bd

Contents?: true

Size: 779 Bytes

Versions: 4

Compression:

Stored size: 779 Bytes

Contents

require 'test_helper'

class ClientApplicationControllerTest < ActiveSupport::IntegrationCase
  test 'must be logged in' do
    visit new_oauth_client_application_path
    assert_equal '/users/sign_in', current_path
  end

  test 'create client application' do
    user = create_user
    as_user(user).visit new_oauth_client_application_path
    assert_equal '/oauth_client_applications/new', current_path

    fill_in 'oauth_client_application_name', :with => rand_name

    click_button 'submitApp'
    assert_equal '/oauth_client_applications', current_path

    last_client = Oauth::ClientApplication.order(:created_at).last
    assert has_content?(last_client.name)
    assert has_content?(last_client.client_id)
    assert has_content?(last_client.client_secret)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
opro-0.0.1 test/integration/client_application_controller_test.rb
opro-0.0.1.pre1.0.2 test/integration/client_application_controller_test.rb
opro-0.0.1.pre1.0.1 test/integration/client_application_controller_test.rb
opro-0.0.1.pre test/integration/client_application_controller_test.rb