X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9018d1af07c53b03bf8caf0480b931dc25f57147..6c6e8883f703efe8e05d893a94c169ac90733d42:/test/controllers/oauth2_applications_controller_test.rb diff --git a/test/controllers/oauth2_applications_controller_test.rb b/test/controllers/oauth2_applications_controller_test.rb index eec5e02ec..338144a95 100644 --- a/test/controllers/oauth2_applications_controller_test.rb +++ b/test/controllers/oauth2_applications_controller_test.rb @@ -67,11 +67,11 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template "oauth2_applications/new" assert_select "form", 1 do - assert_select "input#doorkeeper_application_name", 1 - assert_select "textarea#doorkeeper_application_redirect_uri", 1 - assert_select "input#doorkeeper_application_confidential", 1 + assert_select "input#oauth2_application_name", 1 + assert_select "textarea#oauth2_application_redirect_uri", 1 + assert_select "input#oauth2_application_confidential", 1 Oauth.scopes.each do |scope| - assert_select "input#doorkeeper_application_scopes_#{scope.name}", 1 + assert_select "input#oauth2_application_scopes_#{scope.name}", 1 end end end @@ -87,7 +87,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest session_for(user) assert_difference "Doorkeeper::Application.count", 0 do - post oauth_applications_path(:doorkeeper_application => { + post oauth_applications_path(:oauth2_application => { :name => "Test Application" }) end @@ -95,7 +95,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_template "oauth2_applications/new" assert_difference "Doorkeeper::Application.count", 0 do - post oauth_applications_path(:doorkeeper_application => { + post oauth_applications_path(:oauth2_application => { :name => "Test Application", :redirect_uri => "https://test.example.com/", :scopes => ["bad_scope"] @@ -105,7 +105,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_template "oauth2_applications/new" assert_difference "Doorkeeper::Application.count", 1 do - post oauth_applications_path(:doorkeeper_application => { + post oauth_applications_path(:oauth2_application => { :name => "Test Application", :redirect_uri => "https://test.example.com/", :scopes => ["read_prefs"] @@ -154,11 +154,11 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_response :success assert_template "oauth2_applications/edit" assert_select "form", 1 do - assert_select "input#doorkeeper_application_name", 1 - assert_select "textarea#doorkeeper_application_redirect_uri", 1 - assert_select "input#doorkeeper_application_confidential", 1 + assert_select "input#oauth2_application_name", 1 + assert_select "textarea#oauth2_application_redirect_uri", 1 + assert_select "input#oauth2_application_confidential", 1 Oauth.scopes.each do |scope| - assert_select "input#doorkeeper_application_scopes_#{scope.name}", 1 + assert_select "input#oauth2_application_scopes_#{scope.name}", 1 end end end @@ -178,7 +178,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_template "oauth2_applications/not_found" put oauth_application_path(:id => client, - :doorkeeper_application => { + :oauth2_application => { :name => "New Name", :redirect_uri => nil }) @@ -186,7 +186,7 @@ class Oauth2ApplicationsControllerTest < ActionDispatch::IntegrationTest assert_template "oauth2_applications/edit" put oauth_application_path(:id => client, - :doorkeeper_application => { + :oauth2_application => { :name => "New Name", :redirect_uri => "https://new.example.com/url" })