8534 lines
328 KiB
HTML
8534 lines
328 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html lang='en' xml:lang='en' xmlns='http://www.w3.org/1999/xhtml'>
|
||
<head>
|
||
<meta content='text/html; charset=utf-8' http-equiv='Content-Type' />
|
||
<meta content='en' http-equiv='Content-Language' />
|
||
<title>metrics</title>
|
||
<style>
|
||
/*
|
||
Copyright (c) 2008, Yahoo! Inc. All rights reserved.
|
||
Code licensed under the BSD License:
|
||
http://developer.yahoo.net/yui/license.txt
|
||
version: 2.5.2
|
||
*/
|
||
html{color:#000;background:#FFF;}body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td{margin:0;padding:0;}table{border-collapse:collapse;border-spacing:0;}fieldset,img{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}li{list-style:none;}caption,th{text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;font-weight:normal;}q:before,q:after{content:'';}abbr,acronym {border:0;font-variant:normal;}sup {vertical-align:text-top;}sub {vertical-align:text-bottom;}input,textarea,select{font-family:inherit;font-size:inherit;font-weight:inherit;}input,textarea,select{*font-size:100%;}legend{color:#000;}
|
||
|
||
/* --------------------------------------------------------------
|
||
|
||
buttons.css
|
||
* Gives you some great CSS-only buttons.
|
||
|
||
Created by Kevin Hale [particletree.com]
|
||
* particletree.com/features/rediscovering-the-button-element
|
||
|
||
See Readme.txt in this folder for instructions.
|
||
|
||
-------------------------------------------------------------- */
|
||
|
||
button {
|
||
display:block;
|
||
float:left;
|
||
margin:0 0.583em 0.667em 0;
|
||
padding:5px 10px 5px 7px; /* Links */
|
||
|
||
border:1px solid #dedede;
|
||
border-top:1px solid #eee;
|
||
border-left:1px solid #eee;
|
||
|
||
background-color:#f5f5f5;
|
||
font-family:"Lucida Grande", Tahoma, Arial, Verdana, sans-serif;
|
||
font-size:100%;
|
||
line-height:130%;
|
||
text-decoration:none;
|
||
font-weight:bold;
|
||
color:#565656;
|
||
cursor:pointer;
|
||
}
|
||
button {
|
||
width:auto;
|
||
overflow:visible;
|
||
padding:4px 10px 3px 7px; /* IE6 */
|
||
}
|
||
button[type] {
|
||
padding:4px 10px 4px 7px; /* Firefox */
|
||
line-height:17px; /* Safari */
|
||
}
|
||
*:first-child+html button[type] {
|
||
padding:4px 10px 3px 7px; /* IE7 */
|
||
}
|
||
button img {
|
||
margin:0 3px -3px 0 !important;
|
||
padding:0;
|
||
border:none;
|
||
width:16px;
|
||
height:16px;
|
||
float:none;
|
||
}
|
||
|
||
|
||
/* Button colors
|
||
-------------------------------------------------------------- */
|
||
|
||
/* Standard */
|
||
button:hover {
|
||
background-color:#dff4ff;
|
||
border:1px solid #c2e1ef;
|
||
color:#336699;
|
||
}
|
||
|
||
/* Positive */
|
||
body .positive {
|
||
color:#529214;
|
||
}
|
||
button.positive:hover {
|
||
background-color:#E6EFC2;
|
||
border:1px solid #C6D880;
|
||
color:#529214;
|
||
}
|
||
|
||
/* Negative */
|
||
body .negative {
|
||
color:#d12f19;
|
||
}
|
||
button.negative:hover {
|
||
background:#fbe3e4;
|
||
border:1px solid #fbc2c4;
|
||
color:#d12f19;
|
||
}
|
||
|
||
html {
|
||
background-color: #e0e0e0; }
|
||
|
||
body {
|
||
font-size: 100%;
|
||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif;
|
||
color: #333333; }
|
||
|
||
a {
|
||
color: #ed1556;
|
||
text-decoration: none; }
|
||
a:hover {
|
||
color: #ffffff;
|
||
background-color: #ed1556; }
|
||
|
||
#header, #content, #footer {
|
||
margin: 0 auto;
|
||
background: #eeeeee;
|
||
padding: 0 2em;
|
||
z-index: 0;
|
||
position: relative;
|
||
font-size: 1em; }
|
||
|
||
#header {
|
||
background: #ffffff; }
|
||
#header h1 {
|
||
font-weight: bold;
|
||
font-size: 1.5em; }
|
||
#header address.watermark {
|
||
position: absolute;
|
||
font-weight: bold;
|
||
right: 3em;
|
||
top: 0;
|
||
font-size: .75em;
|
||
color: #cccccc; }
|
||
#header address.watermark a {
|
||
color: #cccccc;
|
||
font-weight: bold;
|
||
font-size: 2em; }
|
||
#header address.watermark a:hover {
|
||
background: transparent;
|
||
color: #aaaaaa; }
|
||
|
||
#content {
|
||
padding-top: 1em;
|
||
padding-bottom: 2em; }
|
||
#content strong {
|
||
font-weight: bold; }
|
||
#content em {
|
||
font-style: italic; }
|
||
#content h1, #content h2, #content h3, #content h4, #content h5, #content h6 {
|
||
color: #4e4e4e; }
|
||
#content h1 {
|
||
font-size: 2em;
|
||
font-weight: bold;
|
||
margin-bottom: .75em;
|
||
padding: .25em 0;
|
||
line-height: 1.2;
|
||
border-bottom: 1px solid #c0c0c0; }
|
||
#content h2 {
|
||
font-weight: bold;
|
||
font-size: 1.5em;
|
||
margin: 1em 0 .2em; }
|
||
#content h3 {
|
||
font-weight: bold;
|
||
font-size: 1.25em;
|
||
margin: .25em 0; }
|
||
#content h4, #content h5, #content h6 {
|
||
font-weight: bold;
|
||
margin-top: .5em; }
|
||
#content code, #content pre, #content textarea, #content input {
|
||
font-family: Monaco, Deja Vu Sans Mono, Inconsolata, Consolas, monospace; }
|
||
#content form p {
|
||
margin-top: 1em;
|
||
position: relative; }
|
||
#content form p.checkbox label {
|
||
margin-top: 0 !important; }
|
||
#content form input.text, #content form textarea {
|
||
width: 30em;
|
||
padding: .2em .4em;
|
||
color: #4e4e4e; }
|
||
#content form input.text {
|
||
height: 1.4em; }
|
||
#content form label {
|
||
float: left;
|
||
display: block;
|
||
margin-top: .5em;
|
||
width: 8em;
|
||
margin-right: .75em; }
|
||
#content form .with_errors label {
|
||
background: red;
|
||
color: white;
|
||
position: relative;
|
||
top: -.7em; }
|
||
#content form .with_errors.required label {
|
||
position: static;
|
||
margin-right: .25em;
|
||
padding: 0 .2em; }
|
||
#content form .with_errors input, #content form .with_errors textarea {
|
||
border: 2px solid #f22;
|
||
background: #fee;
|
||
color: #222222; }
|
||
#content form .required label {
|
||
float: none;
|
||
display: block;
|
||
width: auto;
|
||
position: relative;
|
||
font-weight: bold;
|
||
margin-top: 1em;
|
||
text-indent: -.65em; }
|
||
#content form .required label:before {
|
||
content: "* ";
|
||
color: #ed1556; }
|
||
#content form .required input.text {
|
||
width: 25.6em;
|
||
font-size: 24px;
|
||
font-weight: bold; }
|
||
#content form .normal {
|
||
margin-top: 2em; }
|
||
#content form h2.notifier label {
|
||
float: none;
|
||
width: auto;
|
||
margin-right: 0; }
|
||
#content form h2.notifier label .warning {
|
||
font-size: .5em;
|
||
font-weight: normal;
|
||
color: #999999; }
|
||
#content form fieldset {
|
||
padding-bottom: 1em;
|
||
margin-left: 1.35em;
|
||
border-bottom: 1px solid #c0c0c0;
|
||
margin-bottom: 1em; }
|
||
#content form fieldset h3 {
|
||
margin-top: 1em;
|
||
margin-bottom: 0; }
|
||
#content form fieldset p.normal {
|
||
margin-top: 1em; }
|
||
#content form fieldset p label {
|
||
width: 6.7em; }
|
||
#content form p.submit {
|
||
margin-top: 2em; }
|
||
#content form p.submit:after {
|
||
display: block;
|
||
clear: both;
|
||
float: none;
|
||
content: ".";
|
||
text-indent: -9999em;
|
||
text-align: left; }
|
||
#content form p.submit.destroy button, #content form p.submit.manual-build button {
|
||
float: none;
|
||
display: inline; }
|
||
#content form p.submit.manual-build button {
|
||
margin-right: 0; }
|
||
#content #build form, #content #last_build form {
|
||
font-size: .75em; }
|
||
#content #build form p.submit, #content #last_build form p.submit {
|
||
margin: 0;
|
||
padding: 0;
|
||
position: absolute;
|
||
right: .5em;
|
||
top: 1.25em; }
|
||
#content .blank_slate p, #content .error p {
|
||
position: relative;
|
||
top: .3em; }
|
||
#content .blank_slate h1, #content .error h1 {
|
||
border-width: 0;
|
||
margin: 0;
|
||
padding: 0; }
|
||
#content .blank_slate h1 button, #content .error h1 button {
|
||
float: none;
|
||
border: 0 none;
|
||
background: transparent;
|
||
display: inline;
|
||
color: #ed1556;
|
||
padding: 0.25em 0;
|
||
margin: 0; }
|
||
#content .blank_slate h1 button:hover, #content .error h1 button:hover {
|
||
background: #ed1556;
|
||
color: #ffffff; }
|
||
#content .error dt {
|
||
margin-top: 1.4em;
|
||
margin-bottom: .3em;
|
||
font-size: 1.75em;
|
||
font-family: Georgia, Times New Roman, serif; }
|
||
#content .error dd {
|
||
line-height: 1.4; }
|
||
#content .error .backtrace {
|
||
margin: 1em 0;
|
||
overflow: scroll;
|
||
height: 30em;
|
||
border: 1px solid #c0c0c0;
|
||
line-height: 1.6; }
|
||
#content #projects {
|
||
margin: 1em 0 2em;
|
||
border-top: 1px solid #c0c0c0; }
|
||
#content #projects li {
|
||
position: relative;
|
||
border-bottom: 1px solid #c0c0c0; }
|
||
#content #projects li.odd {
|
||
background: #e6e6e6; }
|
||
#content #projects li.building {
|
||
background: transparent url(/spinner.gif) no-repeat scroll right; }
|
||
#content #projects li a {
|
||
font-size: 2em;
|
||
padding: .25em;
|
||
line-height: 1.2;
|
||
font-weight: bold;
|
||
display: block; }
|
||
#content #projects li a.success {
|
||
color: #337022; }
|
||
#content #projects li a.failed {
|
||
color: #ff1100; }
|
||
#content #projects li .meta {
|
||
position: absolute;
|
||
right: .6em;
|
||
top: 1.5em;
|
||
font-size: 0.8em;
|
||
color: #999999;
|
||
text-align: right; }
|
||
#content #projects li.building .meta {
|
||
right: 1.6em; }
|
||
#content #projects li.success .meta {
|
||
color: #337022; }
|
||
#content #projects li.failed .meta {
|
||
color: #ff1100; }
|
||
#content #previous_builds li a {
|
||
display: block;
|
||
padding: .25em;
|
||
margin-bottom: .25em;
|
||
border-width: 1px;
|
||
border-style: solid; }
|
||
#content #previous_builds li a strong {
|
||
font-size: 1.3em; }
|
||
#content #previous_builds li a .attribution {
|
||
font-size: .9em; }
|
||
#content #projects li.success a, #content #previous_builds li.success a {
|
||
background-color: #bbf8aa;
|
||
border-color: #99d688;
|
||
color: #337022; }
|
||
#content #projects li.success a .attribution, #content #previous_builds li.success a .attribution {
|
||
color: #77b466; }
|
||
#content #projects li.success a:hover, #content #previous_builds li.success a:hover {
|
||
background-color: #ddffcc; }
|
||
#content #projects li.failed a, #content #previous_builds li.failed a {
|
||
background-color: #ffbbaa;
|
||
border-color: #dd9988;
|
||
color: #ff1100; }
|
||
#content #projects li.failed a .attribution, #content #previous_builds li.failed a .attribution {
|
||
color: #bb7766; }
|
||
#content #projects li.failed a:hover, #content #previous_builds li.failed a:hover {
|
||
background-color: #ffddcc; }
|
||
#content #build, #content #last_build {
|
||
position: relative; }
|
||
#content #build h1, #content #build blockquote, #content #last_build h1, #content #last_build blockquote {
|
||
border-width: 0 1px;
|
||
border-style: solid; }
|
||
#content #build h1, #content #last_build h1 {
|
||
border-top-width: 1px; }
|
||
#content #build blockquote, #content #last_build blockquote {
|
||
bottom-bottom-width: 1px;
|
||
line-height: 1.4; }
|
||
#content #build.success h1, #content #build.success blockquote, #content #last_build.success h1, #content #last_build.success blockquote {
|
||
background-color: #bbf8aa;
|
||
border-color: #99d688 #ccffbb #ccffbb #99d688; }
|
||
#content #build.success h1, #content #last_build.success h1 {
|
||
color: #337022; }
|
||
#content #build.success .meta, #content #last_build.success .meta {
|
||
color: #77b466; }
|
||
#content #build.failed h1, #content #build.failed blockquote, #content #last_build.failed h1, #content #last_build.failed blockquote {
|
||
background-color: #ffbbaa;
|
||
border-color: #dd9988 #ffccbb #ffccbb #dd9988; }
|
||
#content #build.failed h1, #content #last_build.failed h1 {
|
||
color: #ff1100; }
|
||
#content #build.failed .meta, #content #last_build.failed .meta {
|
||
color: #bb7766; }
|
||
#content #build h1, #content #last_build h1 {
|
||
margin-top: .5em;
|
||
margin-bottom: 0;
|
||
padding: .25em;
|
||
color: #337022; }
|
||
#content #build blockquote, #content #last_build blockquote {
|
||
padding: .75em;
|
||
margin-bottom: 2em; }
|
||
#content #build blockquote .meta, #content #last_build blockquote .meta {
|
||
margin-top: 1em;
|
||
display: block;
|
||
font-size: .9em; }
|
||
#content #build pre.output, #content #last_build pre.output {
|
||
background: #111;
|
||
color: #fff;
|
||
padding: .5em;
|
||
overflow: auto;
|
||
max-height: 50em;
|
||
font-size: .825em; }
|
||
#content #build pre.output .color30, #content #last_build pre.output .color30 {
|
||
color: #333; }
|
||
#content #build pre.output .color31, #content #last_build pre.output .color31 {
|
||
color: #e33; }
|
||
#content #build pre.output .color32, #content #last_build pre.output .color32 {
|
||
color: #3e3; }
|
||
#content #build pre.output .color33, #content #last_build pre.output .color33 {
|
||
color: #ee3; }
|
||
#content #build pre.output .color34, #content #last_build pre.output .color34 {
|
||
color: #33e; }
|
||
#content #build pre.output .color35, #content #last_build pre.output .color35 {
|
||
color: #e3e; }
|
||
#content #build pre.output .color36, #content #last_build pre.output .color36 {
|
||
color: #3ee; }
|
||
#content #build pre.output .color37, #content #last_build pre.output .color37 {
|
||
color: #fff; }
|
||
#content #push_path {
|
||
display: block;
|
||
margin-top: 1em;
|
||
margin-left: 2em; }
|
||
#content div#graph {
|
||
width: 100%;
|
||
height: 600px; }
|
||
|
||
a.success {
|
||
color: #bbf8aa; }
|
||
a.success:hover {
|
||
background-color: #bbf8aa;
|
||
color: white; }
|
||
a.failed {
|
||
color: #ffbbaa; }
|
||
a.failed:hover {
|
||
background-color: #ffbbaa;
|
||
color: white; }
|
||
|
||
#footer {
|
||
padding: 1.5em 2.5em;
|
||
border-top: 1px solid #ccc;
|
||
font-size: .8em;
|
||
color: #666;
|
||
text-align: right; }
|
||
#footer strong {
|
||
font-weight: bold; }
|
||
|
||
table {
|
||
margin-top: 20px;
|
||
border-collapse: collapse;
|
||
border: 1px solid #666;
|
||
background: #fff;
|
||
margin-bottom: 20px;
|
||
}
|
||
|
||
table tr.light {
|
||
background: #fff;
|
||
}
|
||
|
||
table tr.dark {
|
||
background: #f9f9f9;
|
||
}
|
||
|
||
table tr:hover {
|
||
background: #FFFFC0;
|
||
}
|
||
|
||
table td, table th {
|
||
padding: 4px;
|
||
font-size: 11px;
|
||
}
|
||
table th {
|
||
text-align: center;
|
||
color: #337022;
|
||
background: #DDFFCC;
|
||
font-weight: bold;
|
||
border: #99D688 1px solid;
|
||
}
|
||
|
||
table td {
|
||
border: #d0d0d0 1px solid;
|
||
}
|
||
|
||
table td.score {
|
||
text-align: right;
|
||
}
|
||
|
||
.warning {
|
||
background: yellow;
|
||
}
|
||
|
||
.bluff-tooltip {
|
||
background: #fff;
|
||
border: 1px solid #d1edf5;
|
||
padding: 8px 8px 6px;
|
||
}
|
||
.bluff-tooltip .color {
|
||
display: block;
|
||
height: 4px;
|
||
width: 30px;
|
||
margin: 0 0 4px;
|
||
overflow: hidden;
|
||
}
|
||
.bluff-tooltip .data {
|
||
font-weight: bold;
|
||
}
|
||
</style>
|
||
<link REL="SHORTCUT ICON" HREF="/favicon.ico">
|
||
<script language="javascript" src="utils.js" type="text/javascript"></script>
|
||
<script language="javascript" src="js-class.js" type="text/javascript"></script>
|
||
<script language="javascript" src="bluff-min.js" type="text/javascript"></script>
|
||
<script language="javascript" src="excanvas.js" type="text/javascript"></script>
|
||
<script language="javascript" src="standalone-framework.js" type="text/javascript"></script>
|
||
<script language="javascript" src="highcharts.js" type="text/javascript"></script>
|
||
</head>
|
||
<body>
|
||
<div id='header'>
|
||
<h1><a href="/">metrics</a> | <a href="index.html">ambition</a></h1>
|
||
<address class='watermark'>
|
||
built with
|
||
<a href='https://github.com/metricfu/metric_fu'>MetricFu</a>
|
||
</address>
|
||
</div>
|
||
<div id='content'>
|
||
<style data-file="rcov">
|
||
.rcov_code td {
|
||
border-bottom: 1px solid #ddd ;
|
||
padding: 0;
|
||
margin: 0;
|
||
}
|
||
.rcov_code tr {
|
||
border: 0px;
|
||
padding:0px;
|
||
margin: 0px;
|
||
}
|
||
.rcov_code pre {
|
||
border: 0px;
|
||
padding: 0px;
|
||
margin: 0px;
|
||
}
|
||
.rcov_run {}
|
||
.rcov_not_run {
|
||
background-color: #d88;
|
||
}
|
||
.rcov_run a, .rcov_not_run a {
|
||
text-decoration: none;
|
||
}
|
||
.rcov_run a {
|
||
color: #333;
|
||
}
|
||
.rcov_not_run a {
|
||
color: #000;
|
||
}
|
||
.rcov_overflow {
|
||
overflow: auto;
|
||
font-size: 50%;
|
||
}
|
||
|
||
</style>
|
||
<h3>Rcov Code Coverage Results</h3>
|
||
|
||
<p>C0 code coverage information.</p>
|
||
|
||
<div id="graph_container"></div>
|
||
<script language="javascript" src="rcov.js?1483411518" type="text/javascript"></script>
|
||
|
||
<p>Total Coverage: 87.1% </p>
|
||
<table>
|
||
<tr>
|
||
<th>File Path</th>
|
||
<th>Percent run</th>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_projects_controller_rb">./app/controllers/projects_controller.rb</a></td>
|
||
<td>21</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_shares_controller_rb">./app/controllers/shares_controller.rb</a></td>
|
||
<td>37</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_missions_controller_rb">./app/controllers/missions_controller.rb</a></td>
|
||
<td>59</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_controllers_shares_controller_spec_rb">./spec/controllers/shares_controller_spec.rb</a></td>
|
||
<td>85</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_controllers_projects_controller_spec_rb">./spec/controllers/projects_controller_spec.rb</a></td>
|
||
<td>86</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_project_rb">./app/models/project.rb</a></td>
|
||
<td>88</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_application_controller_rb">./app/controllers/application_controller.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_notes_controller_rb">./app/controllers/notes_controller.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_sessions_controller_rb">./app/controllers/sessions_controller.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_controllers_users_controller_rb">./app/controllers/users_controller.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_comment_rb">./app/models/comment.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_mission_rb">./app/models/mission.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_missions_user_rb">./app/models/missions_user.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_note_rb">./app/models/note.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_share_rb">./app/models/share.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_app_models_user_rb">./app/models/user.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_controllers_notes_controller_spec_rb">./spec/controllers/notes_controller_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_controllers_sessions_controller_spec_rb">./spec/controllers/sessions_controller_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_controllers_users_controller_spec_rb">./spec/controllers/users_controller_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_comment_spec_rb">./spec/models/comment_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_mission_spec_rb">./spec/models/mission_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_missions_user_spec_rb">./spec/models/missions_user_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_note_spec_rb">./spec/models/note_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_project_spec_rb">./spec/models/project_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_share_spec_rb">./spec/models/share_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
<tr>
|
||
<td><a href="#_spec_models_user_spec_rb">./spec/models/user_spec.rb</a></td>
|
||
<td>100</td>
|
||
</tr>
|
||
|
||
|
||
</table>
|
||
|
||
|
||
<h2 id="_app_controllers_projects_controller_rb"> ./app/controllers/projects_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre>class ProjectsController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> before_action :authenticate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> skip_before_action :verify_authenticity_token, :only => [</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :index,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :create,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :addUsers,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :detail,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :update,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :deleteUsers</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>获取我的项目列表,user_id保存在session中.</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def index</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uid = session[:user_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> data=[]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> Projects_user.where(:user_id => uid).each do |i|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pid=i.project_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> p=Project.find_by(id:pid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> mc = Mission.where(:project_id => pid).size</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uc = Projects_user.where(:project_id => pid).size</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> sc = Share.where(:project_id => pid).size</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> data+=[{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :id => pid,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :name => p.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :content => p.content,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :mission_count => mc,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :users_count => uc,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :shares_count => sc</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :data => data</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>创建项目</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uid = session[:user_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> project = Project.new(project_params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> if project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> Projects_user.create(project_id:project.id,user_id:uid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render status: :created, nothing: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render json: project.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>项目添加用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def addUsers</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uid = User.find_by(email:params[:email]).id# 需要添加的用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> register = session[:user_id]# 当前用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pid = params[:project_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # 检查该项目中是否已经有要添加的用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pu_exist=Projects_user.find_by(project_id:pid,user_id:uid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> if pu_exist.nil?# 不存在</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> params_pu = {project_id: pid,user_id: uid}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pu = Projects_user.new(params_pu)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pu.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> content = "<a>"+User.find_by(id: register).name + "</a> 邀请您进入项目 <a>" + Project.find_by(id: pid).name+"</a>"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> puts content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> params_note = {user_id: uid,content: content,category: 2,project_id: pid}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> note.save!</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> else# 存在</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render json:current_user.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>项目删除用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def deleteUsers</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uid = params[:user_id]# 需要添加的用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> register = session[:user_id]# 当前用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pid = params[:project_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # 检查该项目中是否已经有要添加的用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> projects_user=Projects_user.find_by(project_id:pid,user_id:uid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> if projects_user.nil?# 不存在</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render json:current_user.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # 存在</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> puts projects_user.user_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> puts projects_user.project_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> Projects_user.where(project_id:pid,user_id:uid).delete_all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> content ="<a>"+ User.find_by(id: register).name + "</a> 把您从项目 <a>" + Project.find_by(id: pid).name+"</a> 中删除"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> puts content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> params_note = {user_id: uid,content: content,category: 2,project_id: pid}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> note.save!</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>项目详情</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def detail</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #Todo </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> pid = params[:id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> project = Project.find_by(id: pid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #uid = Projects_user.where(:project_id => pid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> users = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> projects_users = Projects_user.where("project_id = ?",pid).all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> projects_users.each do |projects_user|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> uid = projects_user.user_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> i = User.find_by(id: uid)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> users += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :name => i.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :id => i.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #puts users.inspect </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # Users.find(uid).each do |i|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # users += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # :nickname => i.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # :id => i.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> # end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :data => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :name => project.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :content => project.content,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> :users => users</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> #=============================================>项目修改</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def update</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> project = Project.find_by(:id => params[:project][:id])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> if project.update(project_params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> render json:current_user.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> private</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> def project_params</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> params.require(:project).permit(:name,:content,:id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/projects_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_shares_controller_rb"> ./app/controllers/shares_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre>class SharesController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> before_action :authenticate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> skip_before_action :verify_authenticity_token, :only => [</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :create,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :getShareList</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> #当前用户创建分享</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> def create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> uid = session[:user_id].to_i</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> share=Share.new(share_params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> share.user_id=uid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> if share.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> content = "<a>"+User.find(uid).name + "</a> 分享了一些事"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> pid=share.project_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> Projects_user.where(:project_id => pid).each do |i|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> params_note = {user_id: i.user_id,content: content,category: 1,project_id: pid}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> note.save!</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> render status: :created, nothing: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> render json: project.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> #获取项目的分享列表</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> def getShareList</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> pid = params[:project_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> data = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> Share.where(:project_id => pid).order("created_at desc").each do |i|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> puts i.content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> name = User.find(i.user_id).name</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> data += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :name => name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :time => i.created_at,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :content => i.content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> :data => data</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> private</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> def share_params</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> params.require(:share).permit(:project_id,:content)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/shares_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_missions_controller_rb"> ./app/controllers/missions_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre>class MissionsController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> before_action :authenticate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> skip_before_action :verify_authenticity_token, :only => [</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :create,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :getlist,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :detail,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :update,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :commentPublish</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #======================================>获取当前项目某状态的任务列表</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> def getlist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> pid = params[:project_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> stu = params[:status_type]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #missions = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> details = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions = Mission.where("project_id = ? AND status = ?",pid,stu).all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions.each do |mission|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts mission.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> details += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :id => mission.id,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :name => mission.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :content => mission.content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # Mission.where(:project_id => pid).where(:status => stu) do |i|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # missions += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # :id => i.id,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # :name => i.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # :content => i.content</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> # end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :data => missions</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #======================================>获取任务详细信息</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> def detail</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> username = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> comments_s = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission_id = params[:id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission = Mission.find_by(id: mission_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> m_us = Missions_user.where("mission_id = ?",mission_id).all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts m_us.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> m_us.each do |m_u|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> user_id = m_u.user_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> user = User.find_by(id: user_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts user.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> username << user.name</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> comments = Comment.where("mission_id = ?",mission_id).all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> comments.each do |c|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> uname = User.find_by(id: c.user_id).name</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> comments_s += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :nickname => uname,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :content => c.content,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :time => c.created_at</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts comments_s.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :data => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :name => mission.name,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :content => mission.content,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :priority => mission.priority,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :status => mission.status,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :deadline => mission.deadline,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :users => username,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> :comments => comments_s</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #======================================>创建任务</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> def create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params_mission = {name: params[:name],project_id: params[:project_id],content: params[:content],deadline: params[:deadline],priority: params[:priority],status: params[:status]}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission = Mission.new(params_mission)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> if mission.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render json: mission.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> userids = params[:users]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> userids.each do |id|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> user_enties = User.find_by(id: id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts user_enties.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params_mu = {mission_id: mission.id,user_id: user_enties.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions_user = Missions_user.new(params_mu)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions_user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> content = "有新任务 <a>"+mission.name+"</a>"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params_note = {content: content,user_id: user_enties.id,category: 3,project_id: mission.project_id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #======================================>修改任务信息</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> def update</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> id = params[:id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #now = Datetime.now</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission = Mission.find_by(id: id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params_mission = {name: params[:name],content: params[:content],deadline: params[:deadline],priority: params[:priority]}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #puts params_mission</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission.update(params_mission)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> Missions_user.delete_all(["mission_id = ?",id])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> userids = params[:users]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> userids.each do |name|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> user_enties = User.find_by(id: id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params = {mission_id: id,user_id: user_enties.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions_user = Missions_user.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> missions_user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> content = "<a>"+mission.name + "</a> 任务信息发生了变化"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params_note = {content: content,user_id: user_enties.id,category: 3,project_id: mission.project_id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #======================================>当前用户发表评论</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> def commentPublish</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> mission_id = params[:mission_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> content = params[:content]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> user_id = session[:user_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> params = {content: content, mission_id: mission_id, user_id: user_id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> comment = Comment.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> if comment.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render :json => {:code => 0}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> render json: mission.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/missions_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_controllers_shares_controller_spec_rb"> ./spec/controllers/shares_controller_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre>RSpec.describe SharesController,type: :controller do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> describe "POST #create" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> it "create a correct share" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> params = {name: "project addUsers test",content: "addUsers test"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project.users << register</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> post :create,project_id: project.id,content: "苟利国家生死以,岂因福祸避趋之"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> describe "GET #getShareList" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> it "return correct share list" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> params = {name: "project test",content: " test"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project.users << register</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> post :create,project_id: project.id,content: "苟利国家生死以,岂因福祸避趋之"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> post :create,project_id: project.id,content: "too young too simple"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> post :create,project_id: project.id,content: "too young too naive"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> get :getShareList,project_id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> puts response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/shares_controller_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_controllers_projects_controller_spec_rb"> ./spec/controllers/projects_controller_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre>RSpec.describe ProjectsController, type: :controller do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> describe "GET #index " do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> it "return valid projects json" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :create,content: "project content 1",name: "project1"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :create,content: "project content 2", name: "project2"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> get :index</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> puts response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> describe "POST #create" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> it "can create a valid project" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> #puts user.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :create,content: "project content 1",name: "project1"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> #puts response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> describe "POST #addUsers" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> it "can addUsers correctly" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> #user1 = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user2 = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> params = {name: "project addUsers test",content: "addUsers test"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project.users << register</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> #post :create,content: "project content 3",name: "project3"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :addUsers,user_id: user2.id,project_id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> describe "GET #detail" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> it "can return correct json format of project " do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user1 = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> user2 = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> params = {name: "project addUsers test",content: "addUsers test"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project.users << register</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :addUsers,user_id: user2.id,project_id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :addUsers,user_id: user1.id,project_id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> post :detail,id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> puts response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/projects_controller_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_project_rb"> ./app/models/project.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre>class Project < ActiveRecord::Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> has_and_belongs_to_many :users</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> validate :require_at_least_on_user,on: :update # 项目中最少要有一个用户</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> validates :name, presence: true, length: { minimum: 1, maximum: 50 }, uniqueness: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> private</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> def require_at_least_on_user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> if !users || users.size == 0 # 这里使用size,可以智能选择需不需要查询数据库</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_not_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> errors[:users] = 'at least one user in the project'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/project.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_application_controller_rb"> ./app/controllers/application_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre>class ApplicationController < ActionController::Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> # Prevent CSRF attacks by raising an exception.</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> # For APIs, you may want to use :null_session instead.</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> protect_from_forgery with: :exception</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> def authenticate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> render status: :unauthorized, nothing: true unless session['user_id']</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> private</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> def current_user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> @current_user ||= User.find(session[:user_id]) if session[:user_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre> helper_method :current_user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/application_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_notes_controller_rb"> ./app/controllers/notes_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre>class NotesController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> before_action :authenticate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> #获取用户当前的通知列表</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> def getNotesList</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> #Todo</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> pid = params[:project_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> uid = session[:user_id]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> notes = Note.where("user_id = ? AND project_id = ? ",uid,pid).order("created_at desc").all</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> note = Hash.new do |h,k|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> h[k] = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> notes.each do |n|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> date = n.created_at.to_s[/([\d\-]*)\s(.*)/,1]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> time = n.created_at.to_s[/(.*)\s([\d\:]*)/,2]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> note[date] << {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :content => n.content,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :time => time,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :type => n.category</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> data = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> note.each do |k,v|</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> data += [{</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :time => k,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :notes => v</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> }]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> render :json => {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :code => 0,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> :data => data</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/notes_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_sessions_controller_rb"> ./app/controllers/sessions_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre>class SessionsController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> # 除登录之外,其余接口必须在登录状态下访问</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> before_action :authenticate, except: [ :create ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> skip_before_action :verify_authenticity_token, :only => [:create,:destroy,:show]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> # 用户登录</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> def create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> user = User.find_by(email: params[:email])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> if user && user.authenticate(params[:password])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> session[:user_id] = user.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> render status: :ok, text: 'ok'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> render status: :unauthorized, text: 'account or password is not correct'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> def destroy</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> session.delete :user_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> @current_user &&= nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> render status: :ok, nothing: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> def show</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> render 'show'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/sessions_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_controllers_users_controller_rb"> ./app/controllers/users_controller.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre>class UsersController < ApplicationController</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> before_action :authenticate, except: [ :emailExist, :usernameExist, :create ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> skip_before_action :verify_authenticity_token, :only => [</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> :emailExist,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> :usernameExist,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> :create,</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> :update</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> ]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def emailExist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> if checkExist?(:email, params[:email])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render :text => '1'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render :text => '0'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def usernameExist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> if checkExist?(:name, params[:username])</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render :text => 'exist'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render :text => 'not exist'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> @user = User.new(user_params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> if @user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render status: :created, nothing: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render json: @user.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def update</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> @user = current_user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> if @user.update(user_params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render 'show'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> else</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> render json:current_user.errors, status: :unprocessable_entity</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> private</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def checkExist?(field_name, value)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> User.exists?(field_name => value)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> def user_params</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> params.require(:user).permit(:name,:password, :password_confirmation, :email, :phone)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/controllers/users_controller.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_comment_rb"> ./app/models/comment.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre>class Comment < ActiveRecord::Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> belongs_to :mission</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> validates :content, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> validates :mission_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> validates :user_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> validate :comment_has_atleast_one_character, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> validate :user_id_exist, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> private </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> def comment_has_atleast_one_character</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> tmp = content.strip</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> if tmp.length < 1</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> errors[:content] = 'content should has at least one character'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> def user_id_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> user = User.find_by(id: user_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> if user == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> errors[:user] = "user is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # mission 是否存在的验证将放在controller中进行</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # def mission_id_should_be_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # @mission = Mission.find(:mission_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # if @mission == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # errors[:mission_id] = "mission is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> # end </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/comment.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_mission_rb"> ./app/models/mission.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre>class Mission < ActiveRecord:: Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> has_many :comments</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :name, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :deadline, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :priority, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :status, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :content, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validates :project_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validate :priority_is_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validate :status_is_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> validate :project_exists, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> private </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> def priority_is_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> if priority != 1 and priority != 2 and priority != 3</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> errors[:priority] = "priority is not among valid values"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> def status_is_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> if status != 1 and status != 2 and status != 3 and status != 4</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> errors[:status] = "status is not among valid values"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> def project_exists</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> #puts project_id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> project = Project.find_by(id: project_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> #puts project.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> if project == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> errors[:project_id] = "project_id is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/mission.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_missions_user_rb"> ./app/models/missions_user.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre>class Missions_user <ActiveRecord:: Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> validates :mission_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> validates :user_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> validate :mission_exist, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> validate :user_exist, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> private </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> def mission_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> mission = Mission.find_by(id: mission_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> if mission == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> errors[:mission] = "mission belong to Missions_user is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> def user_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> user = User.find_by(id: user_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> if user == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> errors[:user] = "user belong to Missions_user is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/missions_user.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_note_rb"> ./app/models/note.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre>class Note < ActiveRecord:: Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> belongs_to :user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validates :content, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validates :user_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validates :project_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validates :category, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validate :note_has_atleast_one_character</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validate :note_category_should_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validate :user_exist, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> validate :project_exist, on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> private </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> def note_has_atleast_one_character</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> tmp = content.strip</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> if tmp.length < 1</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> errors[:content] = "note content should has at least one character"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> def note_category_should_among_valid_values</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> if category != 1 and category != 2 and category !=3</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> errors[:category] = "note category is not among valid values"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> def user_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> user = User.find_by(id: user_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> if user == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> errors[:user] = "user belong to Note is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> def project_exist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> project = Project.find_by(id: project_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> if project == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> errors[:project] = "project should be exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/note.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_share_rb"> ./app/models/share.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre>class Share < ActiveRecord::Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validates :content, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validates :project_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validates :user_id, presence: true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validate :share_has_atleast_one_character </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validate :user_exists,on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> validate :project_exists,on: :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> private </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> def share_has_atleast_one_character</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> tmp = content.strip</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> if tmp.length < 1</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> errors[:content] = "share content should has at least one character"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> def user_exists</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> user = User.find_by(id: user_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> if user == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> errors[:user] = "user belong to Share is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> def project_exists</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> project = Project.find_by(id: project_id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> if project == nil</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> errors[:project] = "user belong to Share is not exist"</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> end </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/share.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_app_models_user_rb"> ./app/models/user.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre>class User < ActiveRecord::Base</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> has_and_belongs_to_many :projects</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> has_and_belongs_to_many :missions</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> has_many :notes</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> has_secure_password # 等价于验证password_confirm和password是否相等,并且验证password是否存在</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> validates :name, presence: true, length: { maximum: 30 }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> validates :email, presence: true, uniqueness: true, length: { maximum: 50},</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> format: { with: /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> validates :password, length: { minimum: 6 },on:create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> validates :phone, presence: true, format: { with: /\A[0-9]{11,11}\Z/i },</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre> multiline: false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/app/models/user.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_controllers_notes_controller_spec_rb"> ./spec/controllers/notes_controller_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre>RSpec.describe NotesController,type: :controller do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> describe "GET #getNotesList" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> it "return correct json format of noteslist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> register = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> user = User.find_by(email: register.email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> session[:user_id] = user.id </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> params = {name: "project mission update test",content: "update test"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> project.users << register</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> params_note = {content: "note content 1",user_id: user.id,category: 2,project_id: project.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> note = Note.new(params_note)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> params_note2 = {content: "note content 2",user_id: user.id,category: 1,project_id: project.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> note2 = Note.new(params_note2)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> note2.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> post :getNotesList,project_id: project.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> puts response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/notes_controller_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_controllers_sessions_controller_spec_rb"> ./spec/controllers/sessions_controller_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre>RSpec.describe SessionsController, type: :controller do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> @user1 = create(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> describe 'POST #create' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> # 合法流程校验</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> context 'with legal account' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, email: @user1.email, password: @user1.password</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should get correct email and password' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> actual_email = @user1.email</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> actual_password = @user1.password</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.params[:email]).to eq(actual_email)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.params[:password]).to eq(actual_password)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should authenticate success' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.session[:user_id]).to eq @user1.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should get ok and text: ok' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response).to have_http_status :ok</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response.body).to eq 'ok'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> # 非法参数测试</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> context 'with illegal account' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, email: @user1.email, password: 'wrong_password'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'does not authenticate success' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.session[:user_id].nil?).to be true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'return with 401' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response).to have_http_status :unauthorized</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response.body).to eq 'account or password is not correct'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should not raise error without param email or password' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, email: @user1.email</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> }.not_to raise_error</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, password: 'wrong_password'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> }.not_to raise_error</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> describe 'DELETE #destroy' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should destroy user id in session' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, email:@user1.email, password: @user1.password</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.session[:user_id].nil?).to be false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> delete :destroy</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(controller.session[:user_id].nil?).to be true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should return 401 without login' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> delete :destroy</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response).to have_http_status :unauthorized</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> describe 'GET #show' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> context 'after login' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> post :create, email:@user1.email, password: @user1.password</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> get :show, format: 'json'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should render show template' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response).to render_template 'show'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should return user in json' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> userInfo = assigns[:current_user]</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(userInfo.id).to eq @user1.id</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> it 'should renturn 401 without login' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> get :show, format: 'json'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> expect(response).to have_http_status :unauthorized</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/sessions_controller_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_controllers_users_controller_spec_rb"> ./spec/controllers/users_controller_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre>RSpec.describe UsersController, type: :controller do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> let(:user) { build(:user_with_sequence_number) }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> let(:user_with_fixed_info){ create(:user)}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> let(:valid_attributes){ attributes_for(:user) }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> let(:invalid_attributes){ attributes_for(:user, email: nil, name: 'username2000') }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> describe 'GET #emailExist' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'valid email' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :emailExist, email: user.email</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response.body).to eq '0'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'duplicated email' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> user = create(:user_with_sequence_number)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :emailExist, email: user.email</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response.body).to eq '1'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should not throw exception with no email param' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :emailExist # 不会失败,则证明没有异常</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :emailExist, other_param: 'test'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> describe 'GET #usernameExist' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'valid username' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :usernameExist, username: user.name</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response.body).to eq 'not exist'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'duplicated username' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> user = create(:user_with_sequence_number)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :usernameExist, username: user.name</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response.body).to eq 'exist'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should not throw exception with no username param' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :usernameExist</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> get :usernameExist, other_param: 'test'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> describe 'POST #create' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> context 'success with valid attributes' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> post :create, user: valid_attributes</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should create user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(User.exists?(assigns[:user].id)).to be true</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should response with 201' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response).to have_http_status :created</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> context 'fail with invalid attributes' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> # 已经在model测试中充分验证校对条件,所以这里只对使用电子邮箱为空的非法条件</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> post :create, user: invalid_attributes</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'does not save the new user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(User.exists? name: 'username2000').to be false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should return errors' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> error_message = JSON.parse response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(error_message['email'].nil?).to be false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(error_message['email']).not_to be_empty</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> context 'deal with params more or less than required' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> let(:data_to_send) { { :name => 'username', :email => '1261138729@qq.com',</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> :password => 'secret', :password_confirmation => 'secret',</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> :more_field => 'test'} }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should throw exception without param[:user]' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> post :create</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> }.to raise_error ActionController::ParameterMissing</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should not throw exception' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect {</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> post :create, user: data_to_send, other_param: 'test'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> }.to_not raise_error</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should not accept other params' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> post :create, user: data_to_send</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> user = assigns(:user)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(user.has_attribute? :more_field).to eq false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> describe 'PATCH #update' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> context 'with valid attributes' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> # 假设已经登录了</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> allow(controller).to receive(:authenticate){ true }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> allow(controller).to receive(:current_user).and_return(User.find user_with_fixed_info.id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> patch :update, user: valid_attributes, format: 'json'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should located current user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(assigns[:user]).to eq user_with_fixed_info</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should render show' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response).to render_template 'show'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> context 'with invalid attributes' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> before :each do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> # 假设已经登录了</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> allow(controller).to receive(:authenticate){ true }</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> allow(controller).to receive(:current_user).and_return(User.find user_with_fixed_info.id)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> patch :update, user: invalid_attributes, format: 'json'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'does not change current user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(assigns[:user]).to eq user_with_fixed_info</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should return error messages and error status' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> error_message = JSON.parse response.body</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(error_message['email'].nil?).to be false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(error_message['email']).not_to be_empty</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> it 'should login first' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> patch :update, user:valid_attributes, format: 'json'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> expect(response).to have_http_status :unauthorized</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/controllers/users_controller_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_comment_spec_rb"> ./spec/models/comment_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre>RSpec.describe Comment , type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> it 'has a valid comment' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {content:"good job",mission_id:123,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(Comment.new(params)).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> it "content should not be empty" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {content: nil,mission_id: 123,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(Comment.new(params)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> it "mission_id should not be empty" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {content:"good job", mission_id: nil,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(Comment.new(params)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> it "content should has at least one word " do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> comment_with_allspace = build(:comment_content_allspace)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> comment_with_allspace.validate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(comment_with_allspace.errors[:content].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> it "user should be exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {name: "mission",deadline: "2016-10-17 10:00:00",priority: 1,status: 2,content: "mission content",project_id: project.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> mission = Mission.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> mission.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(mission).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(mission.errors[:project_id].size).to eq(0)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> params = {content: "comment", mission_id: mission.id, user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> comment = Comment.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> expect(comment).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/comment_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_mission_spec_rb"> ./spec/models/mission_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre>RSpec.describe Mission , type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'has a valid mission' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> params = {name: "mission1",content: "mission content",deadline:"2016-10-17 10:00:00",priority:1,status:"进行中"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission = Mission.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission.validate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(mission).to be_valid </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'content should not be nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(build(:no_content_mission)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'deadline should not be nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(build(:no_deadline_mission)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'status should not be nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(build(:no_status_mission)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'priority should not be nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(build(:no_priority_mission)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'priority is not among valid values' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission = build(:priority_not_among_valid_values)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission.validate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(mission.errors[:priority].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> it 'status is not among valid values' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission = build(:status_not_among_valid_values)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> mission.validate</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> expect(mission.errors[:status].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># RSpec.describe Mission, type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># it 'has a valid mission' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># expect(build(:project)).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># describe 'users test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># it 'has at least on user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># mission_with_no_user = build(:mission)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># mission_with_no_user.users = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># mission_with_no_user.valid?</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># expect(mission_with_no_user.errors[:users].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># describe 'name test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># it 'does not allow absence of name' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># expect(build(:mission, name: nil)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># it 'length of name in [1,20]' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># expect(build(:mission_name_length_gt_20)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/mission_spec.rb'><pre># end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_missions_user_spec_rb"> ./spec/models/missions_user_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre>RSpec.describe Missions_user , type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> it "mission should exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "mission",deadline: "2016-10-17 10:00:00",priority: 1,status: 2,content: "mission content",project_id: project.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> mission = Mission.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> mission.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(mission).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {mission_id: 5,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> missions_user = Missions_user.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> missions_user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(missions_user).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(missions_user.errors[:mission].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(Missions_user.find_by(user_id: user.id)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> it "user should exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {name: "mission",deadline: "2016-10-17 10:00:00",priority: 1,status: 2,content: "mission content",project_id: project.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> mission = Mission.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> mission.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(mission).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> params = {mission_id: mission.id,user_id: 2}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> missions_user = Missions_user.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> missions_user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> #puts missions_user.inspect</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(missions_user).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(missions_user.errors[:user].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> expect(Missions_user.find_by(mission_id: mission.id)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/missions_user_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_note_spec_rb"> ./spec/models/note_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre>RSpec.describe Note , type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> it "has a valid note" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {content: "note content",user_id: user.id,project_id: project.id,category: 1}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note = Note.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> it "notes content should at least has one character" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {content: " ",user_id: user.id,category: 1}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note = Note.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note.errors[:content].size).to eq(2)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> it "category should be among valid values" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {content: " ",user_id: user.id,category: 4}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note = Note.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note.errors[:category].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> it "notes user should be exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {content: "note content",user_id: user.id,project_id: 5,category: 1}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note = Note.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note.errors[:project].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(Note.find_by(project_id: 5)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> it "notes project should be exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> params = {content: "note content",user_id: 5,project_id: project.id,category: 1}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note = Note.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> note.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(note.errors[:user].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> expect(Note.find_by(user_id: 5)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/note_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_project_spec_rb"> ./spec/models/project_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre>RSpec.describe Project, type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> it 'has a valid factory' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> expect(build(:project)).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> describe 'users test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> it 'has at least on user' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> project_with_no_user = build(:project)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> project_with_no_user.users = []</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> project_with_no_user.valid?</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> expect(project_with_no_user.errors[:users].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> describe 'name test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> it 'does not allow absence of name' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> expect(build(:project, name: nil)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> it 'length of name in [1,20]' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> expect(build(:project_name_length_gt_20)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> it 'does not allow duplicate name' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> create(:project, name: 'project1')</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> expect(build(:project, name: 'project1')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/project_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_share_spec_rb"> ./spec/models/share_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre>RSpec.describe Share, type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> it "its a valid share" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "jaxon",email: "370403488@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {content: "share content",project_id: project.id,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share = Share.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(Share.find_by(id: share.id)).to_not eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> it "share content should have at least one character" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {content: " ",project_id: project.id,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share = Share.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share.errors[:content].size).to eq(2)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(Share.find_by(id: share.id)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> it "share's project should be exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {content: "share content",project_id: 5,user_id: user.id}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share = Share.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share.errors[:project].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(Share.find_by(id: share.id)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> it "share's user should be exist" do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "jaxon",email: "370403444@qq.com",password_digest: "123456",phone: "15652336366"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user = User.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> user.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(user).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {name: "project_1",content: "project content"}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project = Project.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.users << user</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> project.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(project).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> params = {content: "share content",project_id: project.id,user_id: 10}</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share = Share.new(params)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> share.save</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(share.errors[:user].size).to eq(1)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> expect(Share.find_by(id: share.id)).to eq(nil)</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre> </pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/share_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
<h2 id="_spec_models_user_spec_rb"> ./spec/models/user_spec.rb</h2>
|
||
<div class="rcov_overflow">
|
||
<table class="rcov_code">
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre>require 'rails_helper'</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre>RSpec.describe User, type: :model do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'has a valid factory' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user)).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> describe 'username test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow absence of username' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, name: nil)).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow name length > 30' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user_name_length_gt_30)).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> describe 'email test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow absence of email' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: nil)).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow email length > 50' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user_email_length_gt_50)).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'email should match /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: '123qq.com')).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: '@qq.com')).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: '123@qq')).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: '123@.com')).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, email: '123@qq.')).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> describe 'password test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow password length < 6' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user_password_length_lt_6)).not_to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'password_confirmation should match password when password_confirmation not nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, password: '123456', password_confirmation: '654321')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'do not trigger match when password_confirmation nil' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, password: '123456', password_confirmation: nil)).to be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow password absence on create' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, password: nil, password_confirmation: nil)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'can authenticate' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> user = create(:user, password: '123456', password_confirmation: '123456')</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(user.authenticate('123456')).to be_instance_of User</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(user.authenticate('654312')).to be false</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> describe 'phone test' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow phone absence' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, phone: nil)).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow character other than number' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, phone: '1371234567a')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow phone longer or shorter than 11' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, phone: '137123456789')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, phone: '1371234567')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> # 防js注入</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> it 'does not allow multiline' do</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> expect(build(:user, phone: '13712345\n78')).to_not be_valid</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre> end</pre></a></td>
|
||
</tr>
|
||
|
||
<tr>
|
||
|
||
<td class="rcov_run"><a href='file:///home/ccx/RubymineProjects/ambition/spec/models/user_spec.rb'><pre>end</pre></a></td>
|
||
</tr>
|
||
|
||
</table>
|
||
</div>
|
||
|
||
|
||
<p>Generated on 2017-01-03 10:45:18 +0800</p>
|
||
|
||
</div>
|
||
|
||
|
||
<script language="javascript" src="bluff_graph.js" type="text/javascript"></script>
|
||
</body>
|
||
</html>
|