Permalink
Browse files

Using single-quoted string instead of double-quoted ones

and no lines over 80 characters in the javascript code.
  • Loading branch information...
1 parent 20dea20 commit 5605f67640bef83dae8b93b6c046b34e32f6a4ab @daha committed Jul 19, 2012
Showing with 20 additions and 17 deletions.
  1. +8 −8 app/js/controllers.js
  2. +7 −4 test/e2e/app-e2e.js
  3. +3 −3 test/e2e/scenarios.js
  4. +2 −2 test/unit/controllersSpec.js
View
16 app/js/controllers.js
@@ -45,7 +45,7 @@ var watchForms = {
function SearchCtrl($scope, $location) {
'use strict';
- $scope.user = "angular";
+ $scope.user = 'angular';
$scope.userSearch = function () {
$location.path(['', 'github', $scope.user, ''].join('/'));
@@ -84,9 +84,9 @@ function RepoCtrl($scope, $routeParams, githubResource) {
'use strict';
$scope.repoInfo = githubResource.get({
- "query": "repos",
- "user": $routeParams.user,
- "repo": $routeParams.repo
+ 'query': 'repos',
+ 'user': $routeParams.user,
+ 'repo': $routeParams.repo
});
$scope.watchForms = watchForms;
@@ -98,10 +98,10 @@ function ContribListCtrl($scope, $routeParams, githubResource) {
'use strict';
$scope.contributors = githubResource.get({
- "query": "repos",
- "user": $routeParams.user,
- "repo": $routeParams.repo,
- "spec": "contributors"
+ 'query': 'repos',
+ 'user': $routeParams.user,
+ 'repo': $routeParams.repo,
+ 'spec': 'contributors'
});
}
ContribListCtrl.$inject = ['$scope', '$routeParams', 'githubResource'];
View
11 test/e2e/app-e2e.js
@@ -10,10 +10,13 @@ angular.module('githubContributorsE2E', ['githubContributors', 'ngMockE2E'])
$httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/bar\?/)
.respond(githubResponses.users_bar);
- $httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/foo\/repos\?/)
- .respond(githubResponses.users_foo_repos);
- $httpBackend.whenJSONP(/https:\/\/api\.github\.com\/users\/bar\/repos\?/)
- .respond(githubResponses.users_bar_repos);
+ $httpBackend.whenJSONP(
+ /https:\/\/api\.github\.com\/users\/foo\/repos\?/
+ ).respond(githubResponses.users_foo_repos);
+
+ $httpBackend.whenJSONP(
+ /https:\/\/api\.github\.com\/users\/bar\/repos\?/
+ ).respond(githubResponses.users_bar_repos);
$httpBackend.whenJSONP(
/https:\/\/api\.github\.com\/repos\/foo\/repoA\?/
View
6 test/e2e/scenarios.js
@@ -97,11 +97,11 @@ describe('GitHub Contributors with mocked data', function () {
expect(repoNameLink.row(2)).toEqual(['repoA']);
expect(element('li:nth-child(1) a').attr('href'))
- .toBe("#/github/foo/repoC/");
+ .toBe('#/github/foo/repoC/');
expect(element('li:nth-child(2) a').attr('href'))
- .toBe("#/github/foo/repoB/");
+ .toBe('#/github/foo/repoB/');
expect(element('li:nth-child(3) a').attr('href'))
- .toBe("#/github/foo/repoA/");
+ .toBe('#/github/foo/repoA/');
});
it('should show description if available', function () {
View
4 test/unit/controllersSpec.js
@@ -9,8 +9,8 @@ describe('GitHub Contributors controllers', function () {
ctrl, verifyRequestAndModel,
testUser = 'foo',
anotherUser = 'bar',
- testRepo = "angular",
- anotherRepo = "baz",
+ testRepo = 'angular',
+ anotherRepo = 'baz',
fakeData = ['resonse one'],
otherFakeData = ['another respone'],
baseUrl = 'https://api.github.com/',

0 comments on commit 5605f67

Please sign in to comment.