Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
weather-model
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
weather-model
Commits
a0f74c90
Commit
a0f74c90
authored
May 22, 2017
by
Ivan Lan
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'lan/update_warning_district_ohm_index' into 'master'
Lan/update warning district ohm index See merge request
!16
parents
b3b6e42c
939065e5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
warning.rb
lib/weather-model/source_schemas/warning.rb
+2
-2
weather-model_spec.rb
spec/weather-model_spec.rb
+6
-6
No files found.
lib/weather-model/source_schemas/warning.rb
View file @
a0f74c90
...
...
@@ -11,8 +11,8 @@ module WeatherModel
unit: :string
},
options:
{
index:
[
:publishtime
,
:unit
],
expire:
11
*
24
*
60
*
60
,
index:
[
:publishtime
,
:
level
,
:
unit
],
expire:
2
*
24
*
60
*
60
,
unique:
nil
,
belongs_to:
nil
,
has_many:
nil
,
...
...
spec/weather-model_spec.rb
View file @
a0f74c90
...
...
@@ -33,15 +33,15 @@ RSpec.describe WeatherModel do
end
it
'Test factory_girl'
do
expect
(
@obj
.
class
).
to
eq
(
Forecast
::
CityForecast
),
'factory_girl 生成成功'
expect
(
@obj
.
class
).
to
eq
(
::
WeatherModel
::
Forecast
::
CityForecast
),
'factory_girl 生成成功'
end
end
it
'Forecast'
do
@expire
=
1
mysql
=
Forecast
::
CityForecast
ohm
=
o
hm
mysql
=
::
WeatherModel
::
Forecast
::
CityForecast
ohm
=
::
WeatherModel
::
Forecast
::
CityForecast
::
O
hm
ohm
.
expire
@expire
mysql_obj
=
mysql
.
create
({
datetime:
'2017-05-16'
,
...
...
@@ -66,7 +66,7 @@ RSpec.describe WeatherModel do
end
it
'aqi_forecast'
do
@aqi_forecast
=
Aqi
::
AqiForecast
.
create
(
@aqi_forecast
=
::
WeatherModel
::
Aqi
::
AqiForecast
.
create
(
datetime:
Time
.
now
,
prompt:
''
,
list:
[
...
...
@@ -83,8 +83,8 @@ RSpec.describe WeatherModel do
},
]
)
expect
(
Aqi
::
AqiForecast
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Mysql json_column 正常'
expect
(
Aqi
::
AqiForecast
::
Ohm
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Ohm json_column 正常'
expect
(
::
WeatherModel
::
Aqi
::
AqiForecast
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Mysql json_column 正常'
expect
(
::
WeatherModel
::
Aqi
::
AqiForecast
::
Ohm
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Ohm json_column 正常'
end
describe
'test Ohm # to_h'
do
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment