{"action":"created","comment":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/136976976","pull_request_review_id":60584969,"id":136976976,"diff_hunk":"@@ -0,0 +1,223 @@\n+require 'rails_helper'\n+\n+describe ClientApi::Users::UsersController, type: :controller do\n+  login_user\n+\n+  before do\n+    @user = User.first\n+  end\n+\n+  describe \"GET current_user_info\" do\n+    it \"responds successfully\" do\n+      get :current_user_info, format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+  end\n+\n+  describe \"POST change_password\" do\n+    it \"responds successfully\" do\n+      post :change_password,\n+           params: { user: { password: \"secretPassword\"} },\n+           format: :json\n+\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes password\" do\n+      expect(@user.valid_password?('secretPassword')).to eq(false)\n+      post :change_password,\n+           params: { user: { password: \"secretPassword\"} },\n+           format: :json\n+\n+      expect(@user.reload.valid_password?('secretPassword')).to eq(true)\n+    end\n+\n+    it \"does not change short password\" do\n+      expect(@user.valid_password?('pass')).to eq(false)\n+      post :change_password,\n+           params: { user: { password: \"pass\"} },\n+           format: :json\n+\n+      expect(@user.reload.valid_password?('pass')).to eq(false)\n+    end\n+  end\n+\n+  describe \"POST change_timezone\" do\n+    it \"responds successfully\" do\n+      user = User.first\n+      expect(user.time_zone).to eq('UTC')\n+      post :change_timezone, params: { timezone: 'Pacific/Fiji'}, format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes timezone\" do\n+      user = User.first\n+      expect(user.time_zone).to eq('UTC')\n+      post :change_timezone, params: { timezone: 'Pacific/Fiji'}, format: :json\n+      expect(user.reload.time_zone).to eq('Pacific/Fiji')\n+    end\n+  end\n+\n+  describe \"POST change_initials\" do\n+    it \"responds successfully\" do\n+      post :change_initials, params: { initials: \"TD\"}, format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"responds successfully\" do\n+      user = User.first\n+      expect(user.initials).not_to eq(\"TD\")\n+      post :change_initials, params: { initials: \"TD\"}, format: :json\n+      expect(user.reload.initials).to eq(\"TD\")\n+    end\n+  end\n+\n+  describe \"POST change_system_notification_email\" do\n+    it \"responds successfully\" do\n+      post :change_system_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes notification from false => true\" do\n+      user = User.first\n+      user.system_message_notification_email = false\n+      user.save\n+\n+      post :change_system_notification_email,\n+           params: { status: true },\n+           format: :json\n+      expect(user.reload.system_message_notification_email).to eq(true)\n+    end\n+\n+    it \"changes notification from true => false\" do\n+      user = User.first\n+      user.system_message_notification_email = true\n+      user.save\n+\n+      post :change_system_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(user.reload.system_message_notification_email).to eq(false)\n+    end\n+  end\n+\n+  describe \"POST change_recent_notification_email\" do\n+    it \"responds successfully\" do\n+      post :change_recent_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes notification from false => true\" do\n+      user = User.first\n+      user.recent_notification_email = false\n+      user.save\n+\n+      post :change_recent_notification_email,\n+           params: { status: true },\n+           format: :json\n+      expect(user.reload.recent_notification_email).to eq(true)\n+    end\n+\n+    it \"changes notification from true => false\" do\n+      user = User.first\n+      user.recent_notification_email = true\n+      user.save\n+\n+      post :change_recent_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(user.reload.recent_notification_email).to eq(false)\n+    end\n+  end\n+\n+  describe \"POST change_recent_notification\" do\n+    it \"responds successfully\" do\n+      post :change_recent_notification, params: { status: false }, format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes notification from false => true\" do\n+      user = User.first\n+      user.recent_notification = false\n+      user.save\n+\n+      post :change_recent_notification, params: { status: true }, format: :json\n+      expect(user.reload.recent_notification).to eq(true)\n+    end\n+\n+    it \"changes notification from true => false\" do\n+      user = User.first\n+      user.recent_notification = true\n+      user.save\n+\n+      post :change_recent_notification, params: { status: false }, format: :json\n+      expect(user.reload.recent_notification).to eq(false)\n+    end\n+  end\n+\n+  describe \"POST change_assignements_notification_email\" do\n+    it \"responds successfully\" do\n+      post :change_assignements_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(response).to have_http_status(:ok)\n+    end\n+\n+    it \"changes notification from false => true\" do\n+      user = User.first\n+      user.assignments_notification_email = false\n+      user.save\n+\n+      post :change_assignements_notification_email,\n+           params: { status: true },\n+           format: :json\n+      expect(user.reload.assignments_notification_email).to eq(true)\n+    end\n+\n+    it \"changes notification from true => false\" do\n+      user = User.first\n+      user.assignments_notification_email = true\n+      user.save\n+\n+      post :change_assignements_notification_email,\n+           params: { status: false },\n+           format: :json\n+      expect(user.reload.assignments_notification_email).to eq(false)\n+    end\n+  end\n+\n+  describe \"POST change_assignements_notification\" do","path":"spec/controllers/client_api/users/users_controller_spec.rb","position":193,"original_position":193,"commit_id":"b2e969459ca28c374139db7ee4fe9c96816289c0","original_commit_id":"b2e969459ca28c374139db7ee4fe9c96816289c0","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Prefer single-quoted strings when you don't need string interpolation or special symbols.","created_at":"2017-09-05T12:44:17Z","updated_at":"2017-09-05T12:44:18Z","html_url":"https://github.com/biosistemika/scinote-web/pull/780#discussion_r136976976","pull_request_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments/136976976"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/780#discussion_r136976976"},"pull_request":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780"}}},"pull_request":{"url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780","id":138636147,"html_url":"https://github.com/biosistemika/scinote-web/pull/780","diff_url":"https://github.com/biosistemika/scinote-web/pull/780.diff","patch_url":"https://github.com/biosistemika/scinote-web/pull/780.patch","issue_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/780","number":780,"state":"open","locked":false,"title":"Td sci 1565","user":{"login":"programmertoni","id":11177270,"avatar_url":"https://avatars0.githubusercontent.com/u/11177270?v=4","gravatar_id":"","url":"https://api.github.com/users/programmertoni","html_url":"https://github.com/programmertoni","followers_url":"https://api.github.com/users/programmertoni/followers","following_url":"https://api.github.com/users/programmertoni/following{/other_user}","gists_url":"https://api.github.com/users/programmertoni/gists{/gist_id}","starred_url":"https://api.github.com/users/programmertoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/programmertoni/subscriptions","organizations_url":"https://api.github.com/users/programmertoni/orgs","repos_url":"https://api.github.com/users/programmertoni/repos","events_url":"https://api.github.com/users/programmertoni/events{/privacy}","received_events_url":"https://api.github.com/users/programmertoni/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-08-31T10:50:05Z","updated_at":"2017-09-05T12:44:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1482fc1cf04ba292b0081e54865a9dbe81d7b352","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780/commits","review_comments_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780/comments","review_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/780/comments","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/b2e969459ca28c374139db7ee4fe9c96816289c0","head":{"label":"programmertoni:td_SCI_1565","ref":"td_SCI_1565","sha":"b2e969459ca28c374139db7ee4fe9c96816289c0","user":{"login":"programmertoni","id":11177270,"avatar_url":"https://avatars0.githubusercontent.com/u/11177270?v=4","gravatar_id":"","url":"https://api.github.com/users/programmertoni","html_url":"https://github.com/programmertoni","followers_url":"https://api.github.com/users/programmertoni/followers","following_url":"https://api.github.com/users/programmertoni/following{/other_user}","gists_url":"https://api.github.com/users/programmertoni/gists{/gist_id}","starred_url":"https://api.github.com/users/programmertoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/programmertoni/subscriptions","organizations_url":"https://api.github.com/users/programmertoni/orgs","repos_url":"https://api.github.com/users/programmertoni/repos","events_url":"https://api.github.com/users/programmertoni/events{/privacy}","received_events_url":"https://api.github.com/users/programmertoni/received_events","type":"User","site_admin":false},"repo":{"id":98417182,"name":"scinote-web","full_name":"programmertoni/scinote-web","owner":{"login":"programmertoni","id":11177270,"avatar_url":"https://avatars0.githubusercontent.com/u/11177270?v=4","gravatar_id":"","url":"https://api.github.com/users/programmertoni","html_url":"https://github.com/programmertoni","followers_url":"https://api.github.com/users/programmertoni/followers","following_url":"https://api.github.com/users/programmertoni/following{/other_user}","gists_url":"https://api.github.com/users/programmertoni/gists{/gist_id}","starred_url":"https://api.github.com/users/programmertoni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/programmertoni/subscriptions","organizations_url":"https://api.github.com/users/programmertoni/orgs","repos_url":"https://api.github.com/users/programmertoni/repos","events_url":"https://api.github.com/users/programmertoni/events{/privacy}","received_events_url":"https://api.github.com/users/programmertoni/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/programmertoni/scinote-web","description":"Open source electronic lab notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":true,"url":"https://api.github.com/repos/programmertoni/scinote-web","forks_url":"https://api.github.com/repos/programmertoni/scinote-web/forks","keys_url":"https://api.github.com/repos/programmertoni/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/programmertoni/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/programmertoni/scinote-web/teams","hooks_url":"https://api.github.com/repos/programmertoni/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/programmertoni/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/programmertoni/scinote-web/events","assignees_url":"https://api.github.com/repos/programmertoni/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/programmertoni/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/programmertoni/scinote-web/tags","blobs_url":"https://api.github.com/repos/programmertoni/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/programmertoni/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/programmertoni/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/programmertoni/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/programmertoni/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/programmertoni/scinote-web/languages","stargazers_url":"https://api.github.com/repos/programmertoni/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/programmertoni/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/programmertoni/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/programmertoni/scinote-web/subscription","commits_url":"https://api.github.com/repos/programmertoni/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/programmertoni/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/programmertoni/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/programmertoni/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/programmertoni/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/programmertoni/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/programmertoni/scinote-web/merges","archive_url":"https://api.github.com/repos/programmertoni/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/programmertoni/scinote-web/downloads","issues_url":"https://api.github.com/repos/programmertoni/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/programmertoni/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/programmertoni/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/programmertoni/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/programmertoni/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/programmertoni/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/programmertoni/scinote-web/deployments","created_at":"2017-07-26T11:50:47Z","updated_at":"2017-07-26T11:50:50Z","pushed_at":"2017-09-05T12:43:59Z","git_url":"git://github.com/programmertoni/scinote-web.git","ssh_url":"git@github.com:programmertoni/scinote-web.git","clone_url":"https://github.com/programmertoni/scinote-web.git","svn_url":"https://github.com/programmertoni/scinote-web","homepage":"https://www.scinote.net","size":10803,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"biosistemika:decoupling-settings-page","ref":"decoupling-settings-page","sha":"6159b185333975c35421660eecd94624e8d0a4c7","user":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars2.githubusercontent.com/u/15630206?v=4","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"repo":{"id":51598133,"name":"scinote-web","full_name":"biosistemika/scinote-web","owner":{"login":"biosistemika","id":15630206,"avatar_url":"https://avatars2.githubusercontent.com/u/15630206?v=4","gravatar_id":"","url":"https://api.github.com/users/biosistemika","html_url":"https://github.com/biosistemika","followers_url":"https://api.github.com/users/biosistemika/followers","following_url":"https://api.github.com/users/biosistemika/following{/other_user}","gists_url":"https://api.github.com/users/biosistemika/gists{/gist_id}","starred_url":"https://api.github.com/users/biosistemika/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/biosistemika/subscriptions","organizations_url":"https://api.github.com/users/biosistemika/orgs","repos_url":"https://api.github.com/users/biosistemika/repos","events_url":"https://api.github.com/users/biosistemika/events{/privacy}","received_events_url":"https://api.github.com/users/biosistemika/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/biosistemika/scinote-web","description":"Open source electronic lab notebook (ELN) that helps you manage your laboratory work and stores all your experimental data in one place.","fork":false,"url":"https://api.github.com/repos/biosistemika/scinote-web","forks_url":"https://api.github.com/repos/biosistemika/scinote-web/forks","keys_url":"https://api.github.com/repos/biosistemika/scinote-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/biosistemika/scinote-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/biosistemika/scinote-web/teams","hooks_url":"https://api.github.com/repos/biosistemika/scinote-web/hooks","issue_events_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/events{/number}","events_url":"https://api.github.com/repos/biosistemika/scinote-web/events","assignees_url":"https://api.github.com/repos/biosistemika/scinote-web/assignees{/user}","branches_url":"https://api.github.com/repos/biosistemika/scinote-web/branches{/branch}","tags_url":"https://api.github.com/repos/biosistemika/scinote-web/tags","blobs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/biosistemika/scinote-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/biosistemika/scinote-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/biosistemika/scinote-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/biosistemika/scinote-web/statuses/{sha}","languages_url":"https://api.github.com/repos/biosistemika/scinote-web/languages","stargazers_url":"https://api.github.com/repos/biosistemika/scinote-web/stargazers","contributors_url":"https://api.github.com/repos/biosistemika/scinote-web/contributors","subscribers_url":"https://api.github.com/repos/biosistemika/scinote-web/subscribers","subscription_url":"https://api.github.com/repos/biosistemika/scinote-web/subscription","commits_url":"https://api.github.com/repos/biosistemika/scinote-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/biosistemika/scinote-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/biosistemika/scinote-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/biosistemika/scinote-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/biosistemika/scinote-web/contents/{+path}","compare_url":"https://api.github.com/repos/biosistemika/scinote-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/biosistemika/scinote-web/merges","archive_url":"https://api.github.com/repos/biosistemika/scinote-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/biosistemika/scinote-web/downloads","issues_url":"https://api.github.com/repos/biosistemika/scinote-web/issues{/number}","pulls_url":"https://api.github.com/repos/biosistemika/scinote-web/pulls{/number}","milestones_url":"https://api.github.com/repos/biosistemika/scinote-web/milestones{/number}","notifications_url":"https://api.github.com/repos/biosistemika/scinote-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/biosistemika/scinote-web/labels{/name}","releases_url":"https://api.github.com/repos/biosistemika/scinote-web/releases{/id}","deployments_url":"https://api.github.com/repos/biosistemika/scinote-web/deployments","created_at":"2016-02-12T15:47:19Z","updated_at":"2017-09-05T05:05:35Z","pushed_at":"2017-09-05T12:44:00Z","git_url":"git://github.com/biosistemika/scinote-web.git","ssh_url":"git@github.com:biosistemika/scinote-web.git","clone_url":"https://github.com/biosistemika/scinote-web.git","svn_url":"https://github.com/biosistemika/scinote-web","homepage":"https://www.scinote.net","size":10829,"stargazers_count":103,"watchers_count":103,"language":"Ruby","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":7,"forks":30,"open_issues":7,"watchers":103,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780"},"html":{"href":"https://github.com/biosistemika/scinote-web/pull/780"},"issue":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/780"},"comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/issues/780/comments"},"review_comments":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780/comments"},"review_comment":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/biosistemika/scinote-web/pulls/780/commits"},"statuses":{"href":"https://api.github.com/repos/biosistemika/scinote-web/statuses/b2e969459ca28c374139db7ee4fe9c96816289c0"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"houndci-bot"}}