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
939065e5
Commit
939065e5
authored
May 22, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix spec
parent
25180735
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
weather-model_spec.rb
spec/weather-model_spec.rb
+6
-6
No files found.
spec/weather-model_spec.rb
View file @
939065e5
...
@@ -33,15 +33,15 @@ RSpec.describe WeatherModel do
...
@@ -33,15 +33,15 @@ RSpec.describe WeatherModel do
end
end
it
'Test factory_girl'
do
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
end
end
it
'Forecast'
do
it
'Forecast'
do
@expire
=
1
@expire
=
1
mysql
=
Forecast
::
CityForecast
mysql
=
::
WeatherModel
::
Forecast
::
CityForecast
ohm
=
o
hm
ohm
=
::
WeatherModel
::
Forecast
::
CityForecast
::
O
hm
ohm
.
expire
@expire
ohm
.
expire
@expire
mysql_obj
=
mysql
.
create
({
mysql_obj
=
mysql
.
create
({
datetime:
'2017-05-16'
,
datetime:
'2017-05-16'
,
...
@@ -66,7 +66,7 @@ RSpec.describe WeatherModel do
...
@@ -66,7 +66,7 @@ RSpec.describe WeatherModel do
end
end
it
'aqi_forecast'
do
it
'aqi_forecast'
do
@aqi_forecast
=
Aqi
::
AqiForecast
.
create
(
@aqi_forecast
=
::
WeatherModel
::
Aqi
::
AqiForecast
.
create
(
datetime:
Time
.
now
,
datetime:
Time
.
now
,
prompt:
''
,
prompt:
''
,
list:
[
list:
[
...
@@ -83,8 +83,8 @@ RSpec.describe WeatherModel do
...
@@ -83,8 +83,8 @@ RSpec.describe WeatherModel do
},
},
]
]
)
)
expect
(
Aqi
::
AqiForecast
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Mysql json_column 正常'
expect
(
::
WeatherModel
::
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
::
Ohm
.
all
.
first
.
list
.
class
).
to
eq
(
Array
),
'Ohm json_column 正常'
end
end
describe
'test Ohm # to_h'
do
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