17 lines
501 B
Ruby
17 lines
501 B
Ruby
require "spec_helper"
|
|
|
|
describe Api::OpenidConnect::UserApplicationsController, type: :controller do
|
|
before do
|
|
@app = FactoryGirl.create(:o_auth_application_with_xss)
|
|
@user = FactoryGirl.create :user
|
|
FactoryGirl.create :auth_with_read, user: @user, o_auth_application: @app
|
|
sign_in :user, @user
|
|
end
|
|
|
|
context "when try to XSS" do
|
|
it "should not include XSS script" do
|
|
get :index
|
|
expect(response.body).to_not include("<script>alert(0);</script>")
|
|
end
|
|
end
|
|
end
|