require'spec_helper'describeOauth::ApplicationsControllerdolet(:user){create(:user)}context'project members'dobeforedosign_in(user)enddescribe'GET #index'doit'shows list of applications'doget:indexexpect(response.status).toeq(200)endit'redirects back to profile page if OAuth applications are disabled'dosettings=double(user_oauth_applications?: false)allow_any_instance_of(Gitlab::CurrentSettings).toreceive(:current_application_settings).and_return(settings)get:indexexpect(response.status).toeq(302)expect(response).toredirect_to(profile_path)endendendend