medivo 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (103) hide show
  1. data/app/assets/javascripts/medivo/date.js +1078 -0
  2. data/app/assets/javascripts/medivo/helpers.coffee +31 -0
  3. data/app/assets/javascripts/medivo/lab_appointment/application.js +6 -0
  4. data/app/assets/javascripts/medivo/lab_appointment/handlers.coffee +31 -0
  5. data/app/assets/javascripts/medivo/lab_appointment/models.coffee +16 -0
  6. data/app/assets/javascripts/medivo/lab_appointment/sample/show_appointments.coffee +13 -0
  7. data/app/assets/javascripts/medivo/lab_appointment/views.coffee +9 -0
  8. data/app/assets/javascripts/medivo/lab_list/application.js +2 -1
  9. data/app/assets/javascripts/medivo/lab_list/{init.coffee → handlers.coffee} +7 -6
  10. data/app/assets/javascripts/medivo/lab_list/models.coffee +12 -54
  11. data/app/assets/javascripts/medivo/lab_list/sample/show_labs.coffee +8 -1
  12. data/app/assets/javascripts/medivo/lab_list/views.coffee +21 -30
  13. data/app/assets/javascripts/medivo/models.coffee +29 -0
  14. data/app/assets/javascripts/medivo/views.coffee +16 -0
  15. data/app/controllers/medivo/labs_controller.rb +10 -0
  16. data/app/models/medivo/appointment.rb +21 -0
  17. data/app/models/medivo/appointment_resource.rb +14 -0
  18. data/app/models/medivo/insurance_order.rb +1 -6
  19. data/app/models/medivo/lab.rb +11 -9
  20. data/app/models/medivo/lab_resource.rb +14 -0
  21. data/app/models/medivo/order.rb +2 -2
  22. data/app/models/medivo/primary_insurance.rb +6 -4
  23. data/app/models/medivo/resource_config.rb +16 -0
  24. data/config/routes.rb +1 -0
  25. data/lib/generators/medivo/appointments/appointments_generator.rb +15 -0
  26. data/lib/generators/medivo/labs/labs_generator.rb +33 -0
  27. data/lib/generators/medivo/templates/appointment_resource.yml +11 -0
  28. data/lib/generators/medivo/templates/lab_resource.yml +21 -0
  29. data/lib/generators/medivo/templates/labs_controller.rb +6 -0
  30. data/lib/generators/medivo/templates/search.html.haml +45 -0
  31. data/lib/medivo.rb +2 -1
  32. data/lib/medivo/fdf_generator.rb +36 -0
  33. data/lib/medivo/version.rb +1 -1
  34. data/spec/dummy/app/assets/javascripts/application.js +2 -0
  35. data/spec/dummy/app/controllers/labs_controller.rb +3 -5
  36. data/spec/dummy/app/views/labs/search.html.haml +31 -1
  37. data/spec/dummy/config/medivo/appointment_resource.yml +12 -0
  38. data/spec/dummy/config/medivo/lab_resource.yml +21 -0
  39. data/spec/dummy/config/routes.rb +1 -1
  40. data/spec/dummy/log/development.log +7782 -0
  41. data/spec/dummy/log/test.log +243 -0
  42. data/spec/dummy/tmp/cache/assets/C46/F00/sprockets%2F2281d588b540056c5a7306c32a3761b9 +0 -0
  43. data/spec/dummy/tmp/cache/assets/C69/500/sprockets%2F140b56780716711c2b6eb1028f042ca6 +0 -0
  44. data/spec/dummy/tmp/cache/assets/C6C/8D0/sprockets%2F2f423a28516973330a94ad121151f3bf +0 -0
  45. data/spec/dummy/tmp/cache/assets/C70/AC0/sprockets%2F25232afc7932c662d9d6f032030a2428 +0 -0
  46. data/spec/dummy/tmp/cache/assets/C81/D00/sprockets%2F64f056bd752d271308a86a6f865b1911 +0 -0
  47. data/spec/dummy/tmp/cache/assets/CB4/BD0/sprockets%2F3378f27c0d4f5e6d708665b22707a31f +0 -0
  48. data/spec/dummy/tmp/cache/assets/CC3/EF0/sprockets%2F453b504c1f8f374578636f699eaa455d +0 -0
  49. data/spec/dummy/tmp/cache/assets/CD8/DA0/sprockets%2F622aa5281d15503829a5f7a0bf56fc29 +0 -0
  50. data/spec/dummy/tmp/cache/assets/CDD/820/sprockets%2Fb28231960c7ac62eff9048e702a29c70 +0 -0
  51. data/spec/dummy/tmp/cache/assets/CEC/EF0/sprockets%2F4b24a74018f693c06088bd52f8cc9f86 +0 -0
  52. data/spec/dummy/tmp/cache/assets/CEE/250/sprockets%2F96688f33f2f8aa261bf6701c1d6d7575 +0 -0
  53. data/spec/dummy/tmp/cache/assets/D07/6B0/sprockets%2F69a2df619ff14da071309dac4196400e +0 -0
  54. data/spec/dummy/tmp/cache/assets/D1B/820/sprockets%2F92a83e15913997b3d9ac7ed437b1e44c +0 -0
  55. data/spec/dummy/tmp/cache/assets/D20/F10/sprockets%2Fb2e907e4faa85fe755f4439e3b229088 +0 -0
  56. data/spec/dummy/tmp/cache/assets/D29/000/sprockets%2F61a10ddf57f1129c02a1049bfed6e007 +0 -0
  57. data/spec/dummy/tmp/cache/assets/D2C/F80/sprockets%2F399f6d5eb273936af7ff8f35a77c5037 +0 -0
  58. data/spec/dummy/tmp/cache/assets/D30/920/sprockets%2Fcc4603fc6441ca421a7d02886a81ab9d +0 -0
  59. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  60. data/spec/dummy/tmp/cache/assets/D36/870/sprockets%2Fce9e887568de873b133ae43d7c977f68 +0 -0
  61. data/spec/dummy/tmp/cache/assets/D3A/210/sprockets%2F4f9664dabb00038f85b417cc38bf83a1 +0 -0
  62. data/spec/dummy/tmp/cache/assets/D41/250/sprockets%2F7b3c4426715dcd1feedc4a95e5444256 +0 -0
  63. data/spec/dummy/tmp/cache/assets/D45/320/sprockets%2Fc50ff379a1bdf1dd4d22249058749cf6 +0 -0
  64. data/spec/dummy/tmp/cache/assets/D4C/7A0/sprockets%2Fbc635c7b186d1ef5178f4ed3722d868b +0 -0
  65. data/spec/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4 +0 -0
  66. data/spec/dummy/tmp/cache/assets/D55/ED0/sprockets%2F0f673e42e816c6fe5b66a5c96f896f1a +0 -0
  67. data/spec/dummy/tmp/cache/assets/D5D/3E0/sprockets%2F63fea6cc142b5f02da93bf81e70b2116 +0 -0
  68. data/spec/dummy/tmp/cache/assets/D60/030/sprockets%2Ffc9485f617fc5e9b8918755d2e08ecc6 +0 -0
  69. data/spec/dummy/tmp/cache/assets/D64/C50/sprockets%2F22ee6fb2ab1ea9694ac7f0f41a406094 +0 -0
  70. data/spec/dummy/tmp/cache/assets/D65/6D0/sprockets%2F3ce07ca1958d7ab3e80c4b3e0d24088c +0 -0
  71. data/spec/dummy/tmp/cache/assets/D68/AD0/sprockets%2F19727663b4ec901b812dbdabee2526ec +0 -0
  72. data/spec/dummy/tmp/cache/assets/D69/130/sprockets%2Fbaa4ec50a34ce938c986612c2a47a64e +0 -0
  73. data/spec/dummy/tmp/cache/assets/D6E/700/sprockets%2Ff39fb8d8a25e4f3fd01a3e506ae31935 +0 -0
  74. data/spec/dummy/tmp/cache/assets/D74/9A0/sprockets%2F0ca4e6e833c72156fc7e7d5f007d9ce3 +0 -0
  75. data/spec/dummy/tmp/cache/assets/D76/720/sprockets%2F88d8aa1d2fb41ce79b8ec4150ea74748 +0 -0
  76. data/spec/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384 +0 -0
  77. data/spec/dummy/tmp/cache/assets/D88/2C0/sprockets%2F452ab3ebb1912cf1c2ba617eec52a718 +0 -0
  78. data/spec/dummy/tmp/cache/assets/D9C/F50/sprockets%2F224e78bb9e1c414a2d518a3aaffd6f77 +0 -0
  79. data/spec/dummy/tmp/cache/assets/D9F/260/sprockets%2Fa3e040f83c30e4bbc1c79ffae57909e6 +0 -0
  80. data/spec/dummy/tmp/cache/assets/DA1/640/sprockets%2F91874cbba5e63cd19d6a7bd3c8362dc4 +0 -0
  81. data/spec/dummy/tmp/cache/assets/DC1/230/sprockets%2F3a36cd467bdce1914a2b7af4ed4114cf +0 -0
  82. data/spec/dummy/tmp/cache/assets/DCE/E80/sprockets%2Fc71ec62157b9cc7aabfc030955cef87b +0 -0
  83. data/spec/dummy/tmp/cache/assets/DD1/FD0/sprockets%2Fa531f33dc9c5852d39d64a9eda44dacf +0 -0
  84. data/spec/dummy/tmp/cache/assets/DD4/2B0/sprockets%2Fef214a63f29afe7f3cbffc65af943108 +0 -0
  85. data/spec/dummy/tmp/cache/assets/DFC/420/sprockets%2F502e2c683d1aaad6ac88966ffc4d2ade +0 -0
  86. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  87. data/spec/dummy/tmp/cache/assets/E32/FC0/sprockets%2Fe55fb2eef11567fe04fdaf7e73af5ba4 +0 -0
  88. data/spec/dummy/tmp/pids/server.pid +1 -1
  89. data/spec/models/orders_spec.rb +1 -23
  90. data/spec/models/primary_insurance_spec.rb +31 -0
  91. data/spec/requests/labs_spec.rb +0 -1
  92. data/spec/spec_helper.rb +7 -1
  93. data/spec/support/blueprints.rb +9 -1
  94. data/spec/support/helper.rb +9 -0
  95. metadata +94 -26
  96. data/app/assets/javascripts/medivo/lab_appointments/application.js +0 -0
  97. data/app/assets/javascripts/medivo/lab_appointments/models.coffee +0 -0
  98. data/app/assets/javascripts/medivo/lab_appointments/sample/show_appointments.coffee +0 -0
  99. data/app/assets/javascripts/medivo/lab_appointments/views.coffee +0 -0
  100. data/app/models/medivo/resource.rb +0 -24
  101. data/lib/generators/medivo/install/install_generator.rb +0 -41
  102. data/lib/generators/medivo/install/templates/medivo_resource.yml +0 -9
  103. data/spec/dummy/config/medivo_resource.yml +0 -12
@@ -1137,3 +1137,246 @@ Served asset /medivo/markerB.png - 200 OK (2ms)
1137
1137
 
1138
1138
  Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-28 17:44:24 +0100
1139
1139
  Served asset /medivo/arrow.png - 200 OK (1ms)
1140
+
1141
+
1142
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:24:18 +0100
1143
+ Processing by Medivo::LabsController#lab_data as HTML
1144
+ Parameters: {"zip_code"=>"90210"}
1145
+ Completed 200 OK in 445ms (Views: 1.1ms)
1146
+
1147
+
1148
+ Started GET "/medivo/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:24:21 +0100
1149
+
1150
+
1151
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:24:56 +0100
1152
+ Processing by Medivo::LabsController#lab_data as HTML
1153
+ Parameters: {"zip_code"=>"90210"}
1154
+ Completed 200 OK in 928ms (Views: 1.0ms)
1155
+
1156
+
1157
+ Started GET "/medivo/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:24:59 +0100
1158
+
1159
+
1160
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:26:06 +0100
1161
+ Processing by Medivo::LabsController#lab_data as HTML
1162
+ Parameters: {"zip_code"=>"90210"}
1163
+ Completed 200 OK in 1050ms (Views: 1.0ms)
1164
+
1165
+
1166
+ Started GET "/medivo/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:26:09 +0100
1167
+
1168
+
1169
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:30:55 +0100
1170
+ Processing by Medivo::LabsController#lab_data as HTML
1171
+ Parameters: {"zip_code"=>"90210"}
1172
+ Completed 200 OK in 244ms (Views: 1.1ms)
1173
+
1174
+
1175
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:56:08 +0100
1176
+ Processing by Medivo::LabsController#lab_data as HTML
1177
+ Parameters: {"zip_code"=>"90210"}
1178
+ Completed 200 OK in 824ms (Views: 1.2ms)
1179
+
1180
+
1181
+ Started GET "/labs/search?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:56:11 +0100
1182
+ Processing by LabsController#search as HTML
1183
+ Parameters: {"zip_code"=>"90210"}
1184
+ Completed 200 OK in 112ms (Views: 111.4ms)
1185
+
1186
+
1187
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:56:54 +0100
1188
+ Processing by Medivo::LabsController#lab_data as HTML
1189
+ Parameters: {"zip_code"=>"90210"}
1190
+ Completed 200 OK in 139ms (Views: 1.0ms)
1191
+
1192
+
1193
+ Started GET "/labs/search?zip_code=90210" for 127.0.0.1 at 2011-10-29 21:56:56 +0100
1194
+ Processing by LabsController#search as HTML
1195
+ Parameters: {"zip_code"=>"90210"}
1196
+ Completed 200 OK in 108ms (Views: 107.8ms)
1197
+
1198
+
1199
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 22:29:28 +0100
1200
+ Processing by Medivo::LabsController#lab_data as HTML
1201
+ Parameters: {"zip_code"=>"90210"}
1202
+ Completed 200 OK in 285ms (Views: 1.0ms)
1203
+
1204
+
1205
+ Started GET "/labs/search?zip_code=90210" for 127.0.0.1 at 2011-10-29 22:29:31 +0100
1206
+ Processing by LabsController#search as HTML
1207
+ Parameters: {"zip_code"=>"90210"}
1208
+ Completed 200 OK in 109ms (Views: 109.1ms)
1209
+
1210
+
1211
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-29 22:29:49 +0100
1212
+ Processing by Medivo::LabsController#lab_data as HTML
1213
+ Parameters: {"zip_code"=>"90210"}
1214
+ Completed 200 OK in 240ms (Views: 1.2ms)
1215
+
1216
+
1217
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-29 22:29:51 +0100
1218
+ Processing by LabsController#lab_search as HTML
1219
+ Parameters: {"zip_code"=>"90210"}
1220
+ Completed 200 OK in 341ms (Views: 79.6ms)
1221
+
1222
+
1223
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-29 22:29:52 +0100
1224
+ Compiled application.css (2ms) (pid 25080)
1225
+ Served asset /application.css - 200 OK (7ms)
1226
+
1227
+
1228
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-29 22:29:52 +0100
1229
+ Compiled application.js (7ms) (pid 25080)
1230
+ Compiled jquery.js (3ms) (pid 25080)
1231
+ Compiled jquery_ujs.js (0ms) (pid 25080)
1232
+ Compiled medivo/lab_list/application.js (6ms) (pid 25080)
1233
+ Compiled medivo/handlebars.js (0ms) (pid 25080)
1234
+ Compiled medivo/lab_list/models.js (197ms) (pid 25080)
1235
+ Compiled medivo/lab_list/views.js (184ms) (pid 25080)
1236
+ Compiled medivo/lab_list/init.js (173ms) (pid 25080)
1237
+ Compiled medivo/lab_list/sample/show_labs.js (163ms) (pid 25080)
1238
+ Served asset /application.js - 200 OK (833ms)
1239
+
1240
+
1241
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-10-29 22:29:53 +0100
1242
+ Served asset /medivo/markerA.png - 200 OK (47ms)
1243
+
1244
+
1245
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-10-29 22:29:53 +0100
1246
+ Served asset /medivo/markerB.png - 200 OK (3ms)
1247
+
1248
+
1249
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-29 22:29:53 +0100
1250
+ Served asset /medivo/arrow.png - 200 OK (3ms)
1251
+
1252
+
1253
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-30 00:03:49 +0100
1254
+ Processing by Medivo::LabsController#lab_data as HTML
1255
+ Parameters: {"zip_code"=>"90210"}
1256
+ Completed 200 OK in 264ms (Views: 1.1ms)
1257
+
1258
+
1259
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-30 00:03:51 +0100
1260
+ Processing by LabsController#lab_search as HTML
1261
+ Parameters: {"zip_code"=>"90210"}
1262
+ Completed 200 OK in 586ms (Views: 79.3ms)
1263
+
1264
+
1265
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-30 00:03:52 +0100
1266
+ Served asset /application.css - 200 OK (5ms)
1267
+
1268
+
1269
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-30 00:03:52 +0100
1270
+ Compiled application.js (5ms) (pid 25760)
1271
+ Compiled medivo/lab_list/application.js (10ms) (pid 25760)
1272
+ Compiled medivo/helpers.js (177ms) (pid 25760)
1273
+ Compiled medivo/models.js (176ms) (pid 25760)
1274
+ Compiled medivo/views.js (172ms) (pid 25760)
1275
+ Compiled medivo/lab_list/models.js (201ms) (pid 25760)
1276
+ Compiled medivo/lab_list/views.js (179ms) (pid 25760)
1277
+ Compiled medivo/lab_list/init.js (204ms) (pid 25760)
1278
+ Compiled medivo/lab_list/sample/show_labs.js (161ms) (pid 25760)
1279
+ Served asset /application.js - 200 OK (1407ms)
1280
+
1281
+
1282
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-10-30 00:03:53 +0100
1283
+ Served asset /medivo/markerB.png - 200 OK (5ms)
1284
+
1285
+
1286
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-10-30 00:03:53 +0100
1287
+ Served asset /medivo/markerA.png - 200 OK (2ms)
1288
+
1289
+
1290
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-30 00:03:54 +0100
1291
+ Served asset /medivo/arrow.png - 200 OK (2ms)
1292
+
1293
+
1294
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-30 16:49:22 +0000
1295
+ Processing by Medivo::LabsController#lab_data as HTML
1296
+ Parameters: {"zip_code"=>"90210"}
1297
+ Completed 200 OK in 878ms (Views: 1.0ms)
1298
+
1299
+
1300
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-30 16:49:25 +0000
1301
+ Processing by LabsController#lab_search as HTML
1302
+ Parameters: {"zip_code"=>"90210"}
1303
+ Completed 200 OK in 83ms (Views: 82.6ms)
1304
+
1305
+
1306
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-30 16:49:25 +0000
1307
+ Compiled application.css (1ms) (pid 28701)
1308
+ Served asset /application.css - 200 OK (8ms)
1309
+
1310
+
1311
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-30 16:49:25 +0000
1312
+ Compiled application.js (8ms) (pid 28701)
1313
+ Compiled jquery.js (30ms) (pid 28701)
1314
+ Compiled jquery_ujs.js (0ms) (pid 28701)
1315
+ Compiled medivo/lab_list/application.js (7ms) (pid 28701)
1316
+ Compiled medivo/handlebars.js (0ms) (pid 28701)
1317
+ Compiled medivo/helpers.js (178ms) (pid 28701)
1318
+ Compiled medivo/lab_list/models.js (185ms) (pid 28701)
1319
+ Compiled medivo/models.js (178ms) (pid 28701)
1320
+ Compiled medivo/lab_list/views.js (220ms) (pid 28701)
1321
+ Compiled medivo/views.js (170ms) (pid 28701)
1322
+ Compiled medivo/lab_list/handlers.js (166ms) (pid 28701)
1323
+ Compiled medivo/lab_list/sample/show_labs.js (162ms) (pid 28701)
1324
+ Compiled medivo/lab_appointment/application.js (11ms) (pid 28701)
1325
+ Compiled medivo/date.js (0ms) (pid 28701)
1326
+ Compiled medivo/lab_appointment/models.js (171ms) (pid 28701)
1327
+ Compiled medivo/lab_appointment/views.js (202ms) (pid 28701)
1328
+ Compiled medivo/lab_appointment/handlers.js (160ms) (pid 28701)
1329
+ Compiled medivo/lab_appointment/sample/show_appointments.js (159ms) (pid 28701)
1330
+ Served asset /application.js - 200 OK (2101ms)
1331
+
1332
+
1333
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-30 17:16:59 +0000
1334
+ Processing by Medivo::LabsController#lab_data as HTML
1335
+ Parameters: {"zip_code"=>"90210"}
1336
+ Completed 200 OK in 377ms (Views: 1.0ms)
1337
+
1338
+
1339
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-30 17:17:01 +0000
1340
+ Processing by LabsController#lab_search as HTML
1341
+ Parameters: {"zip_code"=>"90210"}
1342
+ Completed 200 OK in 119ms (Views: 118.8ms)
1343
+
1344
+
1345
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-30 17:17:02 +0000
1346
+ Served asset /application.css - 200 OK (4ms)
1347
+
1348
+
1349
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-30 17:17:02 +0000
1350
+ Served asset /application.js - 200 OK (18ms)
1351
+
1352
+
1353
+ Started GET "/medivo/labs/lab_data?zip_code=90210" for 127.0.0.1 at 2011-10-30 17:18:59 +0000
1354
+ Processing by Medivo::LabsController#lab_data as HTML
1355
+ Parameters: {"zip_code"=>"90210"}
1356
+ Completed 200 OK in 285ms (Views: 1.0ms)
1357
+
1358
+
1359
+ Started GET "/labs/lab_search?zip_code=90210" for 127.0.0.1 at 2011-10-30 17:19:02 +0000
1360
+ Processing by LabsController#lab_search as HTML
1361
+ Parameters: {"zip_code"=>"90210"}
1362
+ Completed 200 OK in 354ms (Views: 119.9ms)
1363
+
1364
+
1365
+ Started GET "/assets/application.css" for 127.0.0.1 at 2011-10-30 17:19:02 +0000
1366
+ Served asset /application.css - 200 OK (4ms)
1367
+
1368
+
1369
+ Started GET "/assets/application.js" for 127.0.0.1 at 2011-10-30 17:19:02 +0000
1370
+ Served asset /application.js - 200 OK (19ms)
1371
+
1372
+
1373
+ Started GET "/assets/medivo/markerA.png" for 127.0.0.1 at 2011-10-30 17:19:03 +0000
1374
+ Served asset /medivo/markerA.png - 200 OK (3ms)
1375
+
1376
+
1377
+ Started GET "/assets/medivo/markerB.png" for 127.0.0.1 at 2011-10-30 17:19:03 +0000
1378
+ Served asset /medivo/markerB.png - 200 OK (2ms)
1379
+
1380
+
1381
+ Started GET "/assets/medivo/arrow.png" for 127.0.0.1 at 2011-10-30 17:19:03 +0000
1382
+ Served asset /medivo/arrow.png - 200 OK (34ms)
@@ -1 +1 @@
1
- 14412
1
+ 26342
@@ -143,29 +143,6 @@ describe Medivo::Order do
143
143
 
144
144
  end
145
145
 
146
- describe Medivo::PrimaryInsurance do
147
- it "makes valid model" do
148
- insurance_info = Medivo::PrimaryInsurance.new(
149
- :relationship=>1,
150
- :company_name=>"Dude Insurance",
151
- :policy_number=>"1234",
152
- :group_number =>"555"
153
- )
154
- insurance_info.valid?.should == true
155
- end
156
-
157
- it "shows error messages for invalid model" do
158
- insurance_info = Medivo::PrimaryInsurance.new(
159
- :company_name=>"Dude Insurance",
160
- :policy_number=>"1234",
161
- :group_number =>"555"
162
- )
163
- insurance_info.valid?.should == false
164
- insurance_info.errors.messages.keys.should == [:relationship]
165
- insurance_info.errors.messages[:relationship].should include "can't be blank"
166
- end
167
- end
168
-
169
146
  describe Medivo::InsuranceOrder do
170
147
  it "requires primary insurance" do
171
148
  order = Medivo::InsuranceOrder.new
@@ -181,6 +158,7 @@ describe Medivo::InsuranceOrder do
181
158
  end
182
159
  end
183
160
 
161
+
184
162
  describe "creating orders" do
185
163
  it "UHC Commercial insurance order" do
186
164
  insurance_info = Medivo::PrimaryInsurance.new(
@@ -0,0 +1,31 @@
1
+ require 'spec_helper'
2
+
3
+ describe Medivo::PrimaryInsurance do
4
+ let(:valid_insurance) { ValidPrimaryInsuranceSample }
5
+
6
+ it "validates true" do
7
+ valid_insurance.valid?.should == true
8
+ end
9
+
10
+ it "generates xml" do
11
+ valid_insurance.to_xml.strip_space.should ==
12
+ "<?xml version=\"1.0\" encoding=\"UTF-8\"?>
13
+ <primary-insurance>
14
+ <relationship type=\"integer\">1</relationship>
15
+ <company-name>Dude Insurance</company-name>
16
+ <policy-number>1234</policy-number>
17
+ <group-number>555</group-number>
18
+ </primary-insurance>".strip_space
19
+ end
20
+
21
+ it "shows error messages for invalid model" do
22
+ insurance_info = Medivo::PrimaryInsurance.new(
23
+ :company_name=>"Dude Insurance",
24
+ :policy_number=>"1234",
25
+ :group_number =>"555"
26
+ )
27
+ insurance_info.valid?.should == false
28
+ insurance_info.errors.messages.keys.should == [:relationship]
29
+ insurance_info.errors.messages[:relationship].should include "can't be blank"
30
+ end
31
+ end
@@ -10,7 +10,6 @@ describe 'LabController' do
10
10
 
11
11
  before do
12
12
  @zip_code = "90210"
13
- #stub(Medivo::ZipCode).find_by_zip_code(@zip_code) { BeverlyHillsZipCode }
14
13
  stub(Medivo::Lab).findLabs(@zip_code) { [BeverlyHillsLab1, BeverlyHillsLab2] }
15
14
  end
16
15
 
data/spec/spec_helper.rb CHANGED
@@ -35,7 +35,13 @@ Spork.prefork do
35
35
  end
36
36
  end
37
37
 
38
- ENGINE_PATH = File.expand_path('../..', __FILE__)
38
+ class String
39
+ def strip_space
40
+ gsub(/\s/, '')
41
+ end
42
+ end
43
+
44
+ ENGINE_PATH = File.expand_path('../..', __FILE__) unless defined? ENGINE_PATH
39
45
  Spork.each_run do
40
46
  Dir["#{Rails.root}/app/**/*.rb"].each { |f| load f }
41
47
  Dir["#{ENGINE_PATH}/app/**/*.rb"].each { |f| load f }