diff options
author | Rémy Coutable <remy@rymai.me> | 2016-12-19 08:33:44 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-12-19 08:33:44 +0000 |
commit | 4f77a3f81e71643bc817b6f2b6003e2f322637aa (patch) | |
tree | 11145582bf3d9fe8269a9ef9540ea76ae4237e88 /spec/features/admin | |
parent | 0b2782f24686ab5ec7a0241e034ab6e24f0cf263 (diff) | |
parent | 5a6252ff4ab4fd24d4c3f1b14d4551061e7acb65 (diff) | |
download | gitlab-ce-4f77a3f81e71643bc817b6f2b6003e2f322637aa.tar.gz |
Merge branch 'move-admin-application-spinach-test-to-rspec' into 'master'
Move admin application spinach test to RSpec
Part of #23036
See merge request !8140
Diffstat (limited to 'spec/features/admin')
-rw-r--r-- | spec/features/admin/admin_manage_applications_spec.rb | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/spec/features/admin/admin_manage_applications_spec.rb b/spec/features/admin/admin_manage_applications_spec.rb new file mode 100644 index 00000000000..c2c618b5659 --- /dev/null +++ b/spec/features/admin/admin_manage_applications_spec.rb @@ -0,0 +1,36 @@ +require 'spec_helper' + +RSpec.describe 'admin manage applications', feature: true do + before do + login_as :admin + end + + it do + visit admin_applications_path + + click_on 'New Application' + expect(page).to have_content('New application') + + fill_in :doorkeeper_application_name, with: 'test' + fill_in :doorkeeper_application_redirect_uri, with: 'https://test.com' + click_on 'Submit' + expect(page).to have_content('Application: test') + expect(page).to have_content('Application Id') + expect(page).to have_content('Secret') + + click_on 'Edit' + expect(page).to have_content('Edit application') + + fill_in :doorkeeper_application_name, with: 'test_changed' + click_on 'Submit' + expect(page).to have_content('test_changed') + expect(page).to have_content('Application Id') + expect(page).to have_content('Secret') + + visit admin_applications_path + page.within '.oauth-applications' do + click_on 'Destroy' + end + expect(page.find('.oauth-applications')).not_to have_content('test_changed') + end +end |