Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
simcaq-node
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
simcaq
simcaq-node
Commits
59f80f7a
There was a problem fetching the pipeline summary.
Commit
59f80f7a
authored
7 years ago
by
Fernando Erd
Browse files
Options
Downloads
Patches
Plain Diff
Fix test in rate school
parent
601259ee
No related branches found
No related tags found
3 merge requests
!116
Release v1.0.0
,
!115
Release v1.0.0
,
!114
Fix test in rate school
Pipeline
#
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/rateSchool.js
+45
-37
45 additions, 37 deletions
src/test/rateSchool.js
with
45 additions
and
37 deletions
src/test/rateSchool.js
+
45
−
37
View file @
59f80f7a
...
...
@@ -24,17 +24,16 @@ const server = require(`${libs}/app`);
chai
.
use
(
chaiHttp
);
describe
(
'
request rate_school
'
,
()
=>
{
it
(
'
should
list default query rate school
'
,
(
done
)
=>
{
it
(
'
should
return 400 with no filters
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
2
00
);
res
.
should
.
have
.
status
(
4
00
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
res
.
body
.
should
.
have
.
property
(
'
error
'
);
res
.
body
.
error
.
should
.
be
.
equal
(
'
Wrong/No filter specified
'
);
done
();
})
;
})
});
it
(
'
should list the year range
'
,
(
done
)
=>
{
...
...
@@ -133,106 +132,115 @@ describe('request rate_school', () => {
});
});
it
(
'
should list the fifth household income
'
,
(
done
)
=>
{
it
(
'
should list the dimensions of ethnic groups
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
/fifth_household_income
'
)
.
get
(
'
/api/v1/
/
rate_school
?dims=ethnic_group_pnad&filter=min_year:"2015",max_year:"2015",age_range:["1"]
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
ethnic_group_pnad_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
ethnic_group_pnad_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
done
();
});
});
it
(
'
should list the
extremes household income
'
,
(
done
)
=>
{
it
(
'
should list the
dimensions of gender
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
/extremes_household_income
'
)
.
get
(
'
/api/v1/
/
rate_school
?dims=gender&filter=min_year:"2015",max_year:"2015",age_range:["1"]
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
gender_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
gender_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
done
();
});
});
it
(
'
should list
rate schools with dimension extremes
household income
'
,
(
done
)
=>
{
it
(
'
should list
fifth
household income
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
?dims=extremes
_household_income
'
)
.
get
(
'
/api/v1/
/
rate_school
/fifth
_household_income
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
extremes_household_income_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
name
'
);
done
();
});
});
it
(
'
should list
rate schools wi
th dimension fifth house
h
old income
'
,
(
done
)
=>
{
it
(
'
should list th
e
dimension
s of
fifth house
b
old income
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school?dims=fifth_household_income
'
)
.
get
(
'
/api/v1/
/
rate_school?dims=fifth_household_income
&filter=min_year:"2015",max_year:"2015",age_range:["1"]
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
fifth_household_income_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
fifth_household_income_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
done
();
});
});
it
(
'
should list
rate schools with dimension fifth
household income
'
,
(
done
)
=>
{
it
(
'
should list
extremes
household income
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
?filter=region:[1,2],min_year:2015
'
)
.
get
(
'
/api/v1/
/
rate_school
/extremes_household_income
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
name
'
);
done
();
});
});
it
(
'
should list the dimensions of e
thnic groups
'
,
(
done
)
=>
{
it
(
'
should list the dimensions of e
xtremes housebold income
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school?dims=e
thnic_group_pnad
'
)
.
get
(
'
/api/v1/
/
rate_school?dims=e
xtremes_household_income&filter=min_year:"2015",max_year:"2015",age_range:["1"]
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
ethnic_group_pnad_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
ethnic_group_pnad_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
extremes_household_income_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
extremes_household_income_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
denominator
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
partial
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
total
'
);
done
();
});
});
it
(
'
should list
the dimensions of gender
'
,
(
done
)
=>
{
it
(
'
should list
year range
'
,
(
done
)
=>
{
chai
.
request
(
server
)
.
get
(
'
/api/v1/rate_school
?dims=gender
'
)
.
get
(
'
/api/v1/
/
rate_school
/year_range
'
)
.
end
((
err
,
res
)
=>
{
res
.
should
.
have
.
status
(
200
);
res
.
should
.
be
.
json
;
res
.
body
.
should
.
have
.
property
(
'
result
'
);
res
.
body
.
result
.
should
.
be
.
a
(
'
array
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
gender_pnad_id
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
g
end
er_pnad_name
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
start_year
'
);
res
.
body
.
result
[
0
].
should
.
have
.
property
(
'
end
_year
'
);
done
();
});
});
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment