text: import { resolve } from 'rsvp';
  import Service from '@ember/service';
  
  const scms = [
    {
      context: 'github:github.com',
      displayName: 'github.com',
      iconType: 'github',
      autoDeployKeyGeneration: true,
      isSignedIn: true
    },
    {
      context: 'bitbucket:bitbucket.org',
      displayName: 'bitbucket.org',
      iconType: 'bitbucket',
      isSignedIn: false
    }
  ];
  
  /**
   * Inject scm service to an Ember Object
   * @param {Object}    self      - Ember object generated by ember-qunit moduleFor()
   */
  export default function injectScmServiceStub(self) {
    const scmServiceStub = Service.extend({
      createScms() {
        return resolve(scms);
      },
      getScms() {
        return scms;
      },
      getScm(scmContext) {
        return this.getScms().find(scm => scm.context === scmContext);
      }
    });
  
    self.owner.register('service:scm', scmServiceStub);
  }
  