apidae 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/README.rdoc +2 -2
- data/Rakefile +38 -38
- data/app/assets/images/apidae/logo-apidae-grey.svg +84 -84
- data/app/assets/javascripts/apidae/application.js +13 -13
- data/app/assets/stylesheets/apidae/application.css +15 -15
- data/app/controllers/apidae/api_controller.rb +25 -25
- data/app/controllers/apidae/application_controller.rb +6 -6
- data/app/controllers/apidae/dashboard_controller.rb +13 -13
- data/app/controllers/apidae/import_controller.rb +68 -68
- data/app/controllers/apidae/objects_controller.rb +59 -59
- data/app/controllers/apidae/projects_controller.rb +35 -35
- data/app/controllers/apidae/references_controller.rb +9 -9
- data/app/controllers/apidae/selections_controller.rb +53 -53
- data/app/helpers/apidae/api_helper.rb +4 -4
- data/app/helpers/apidae/application_helper.rb +4 -4
- data/app/helpers/apidae/dashboard_helper.rb +4 -4
- data/app/helpers/apidae/import_helper.rb +4 -4
- data/app/helpers/apidae/objects_helper.rb +4 -4
- data/app/helpers/apidae/references_helper.rb +4 -4
- data/app/helpers/apidae/selections_helper.rb +4 -4
- data/app/models/apidae/application_record.rb +5 -5
- data/app/models/apidae/export.rb +13 -13
- data/app/models/apidae/file_import.rb +161 -161
- data/app/models/apidae/obj.rb +351 -351
- data/app/models/apidae/project.rb +4 -4
- data/app/models/apidae/reference.rb +45 -45
- data/app/models/apidae/selection.rb +160 -160
- data/app/models/apidae/selection_object.rb +6 -6
- data/app/models/apidae/town.rb +28 -27
- data/app/views/apidae/dashboard/index.html.erb +41 -41
- data/app/views/apidae/import/callback.html.erb +2 -2
- data/app/views/apidae/objects/_form.html.erb +73 -73
- data/app/views/apidae/objects/edit.html.erb +6 -6
- data/app/views/apidae/objects/index.html.erb +34 -34
- data/app/views/apidae/objects/index.json.jbuilder +6 -6
- data/app/views/apidae/objects/new.html.erb +5 -5
- data/app/views/apidae/objects/show.html.erb +74 -74
- data/app/views/apidae/projects/edit.html.erb +32 -32
- data/app/views/apidae/projects/index.html.erb +34 -34
- data/app/views/apidae/references/index.html.erb +34 -34
- data/app/views/apidae/selections/_form.html.erb +29 -29
- data/app/views/apidae/selections/edit.html.erb +6 -6
- data/app/views/apidae/selections/index.html.erb +34 -34
- data/app/views/apidae/selections/new.html.erb +5 -5
- data/app/views/apidae/selections/show.html.erb +19 -19
- data/app/views/layouts/apidae/application.html.erb +14 -14
- data/config/locales/apidae.fr.yml +6 -6
- data/config/routes.rb +14 -14
- data/db/migrate/20170512212941_create_apidae_selections.rb +11 -11
- data/db/migrate/20170512214641_create_apidae_objects.rb +22 -22
- data/db/migrate/20170512221525_create_apidae_objects_apidae_selections.rb +8 -8
- data/db/migrate/20170513114002_create_apidae_towns.rb +15 -15
- data/db/migrate/20170513114409_add_town_insee_code_to_objects.rb +5 -5
- data/db/migrate/20170513115401_add_pictures_data_to_objects.rb +5 -5
- data/db/migrate/20170513121215_create_apidae_attached_files.rb +13 -13
- data/db/migrate/20170513205932_rename_objects_selections_table.rb +5 -5
- data/db/migrate/20170720161134_add_entity_data_to_objects.rb +5 -5
- data/db/migrate/20170730102424_create_apidae_file_imports.rb +13 -13
- data/db/migrate/20171025075304_create_apidae_exports.rb +15 -15
- data/db/migrate/20180217222410_create_apidae_selection_objects.rb +10 -10
- data/db/migrate/20180218172704_change_text_columns_to_json.rb +10 -10
- data/db/migrate/20180218231319_add_service_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180222104915_add_rates_data_to_apidae_objects.rb +6 -6
- data/db/migrate/20180222105302_rename_openings_to_openings_data.rb +5 -5
- data/db/migrate/20180307164936_add_attachments_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180307170349_create_apidae_references.rb +12 -12
- data/db/migrate/20180314093512_add_tags_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180314132631_add_meta_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180319143954_remove_apidae_id_unicity.rb +6 -6
- data/db/migrate/20180417164604_add_location_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180417165744_remove_address_from_apidae_objects.rb +5 -5
- data/db/migrate/20180417171344_remove_lat_lng_from_apidae_objects.rb +6 -6
- data/db/migrate/20180418141248_add_description_data_to_apidae_objects.rb +5 -5
- data/db/migrate/20180418141305_remove_desc_columns_from_apidae_objects.rb +6 -6
- data/db/migrate/20180424141656_add_meta_data_to_apidae_references.rb +5 -5
- data/db/migrate/20180519170210_remove_insee_code_unicity.rb +7 -7
- data/db/migrate/20180521211735_destroy_attached_files.rb +5 -5
- data/db/migrate/20180625050400_rename_objects_to_obj.rb +5 -5
- data/db/migrate/20181024072424_add_project_id_to_selections.rb +5 -5
- data/db/migrate/20181024072843_create_apidae_projects.rb +10 -10
- data/db/migrate/20190328122424_add_description_to_apidae_towns.rb +5 -0
- data/lib/apidae.rb +4 -4
- data/lib/apidae/engine.rb +10 -10
- data/lib/apidae/version.rb +3 -3
- data/lib/tasks/apidae_tasks.rake +4 -4
- data/test/apidae_test.rb +7 -7
- data/test/controllers/apidae/api_controller_test.rb +23 -23
- data/test/controllers/apidae/dashboard_controller_test.rb +15 -15
- data/test/controllers/apidae/import_controller_test.rb +15 -15
- data/test/controllers/apidae/objects_controller_test.rb +52 -52
- data/test/controllers/apidae/references_controller_test.rb +13 -13
- data/test/controllers/apidae/selections_controller_test.rb +52 -52
- data/test/data/selections.json +14 -14
- data/test/data/structure.json +64 -64
- data/test/data/update_selections.json +18 -18
- data/test/dummy/README.rdoc +28 -28
- data/test/dummy/Rakefile +6 -6
- data/test/dummy/app/assets/javascripts/application.js +13 -13
- data/test/dummy/app/assets/stylesheets/application.css +15 -15
- data/test/dummy/app/controllers/application_controller.rb +5 -5
- data/test/dummy/app/helpers/application_helper.rb +2 -2
- data/test/dummy/app/views/layouts/application.html.erb +14 -14
- data/test/dummy/bin/bundle +3 -3
- data/test/dummy/bin/rails +4 -4
- data/test/dummy/bin/rake +4 -4
- data/test/dummy/bin/setup +29 -29
- data/test/dummy/config.ru +4 -4
- data/test/dummy/config/application.rb +24 -24
- data/test/dummy/config/boot.rb +5 -5
- data/test/dummy/config/database.yml +20 -20
- data/test/dummy/config/environment.rb +5 -5
- data/test/dummy/config/environments/development.rb +41 -41
- data/test/dummy/config/environments/production.rb +79 -79
- data/test/dummy/config/environments/test.rb +42 -42
- data/test/dummy/config/initializers/apidae.rb +18 -18
- data/test/dummy/config/initializers/assets.rb +11 -11
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -7
- data/test/dummy/config/initializers/cookies_serializer.rb +3 -3
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -4
- data/test/dummy/config/initializers/inflections.rb +16 -16
- data/test/dummy/config/initializers/mime_types.rb +4 -4
- data/test/dummy/config/initializers/session_store.rb +3 -3
- data/test/dummy/config/initializers/to_time_preserves_timezone.rb +10 -10
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -14
- data/test/dummy/config/locales/en.yml +23 -23
- data/test/dummy/config/routes.rb +4 -4
- data/test/dummy/config/secrets.yml +22 -22
- data/test/dummy/db/schema.rb +104 -104
- data/test/dummy/public/404.html +67 -67
- data/test/dummy/public/422.html +67 -67
- data/test/dummy/public/500.html +66 -66
- data/test/fixtures/apidae/exports.yml +15 -15
- data/test/fixtures/apidae/objects.yml +33 -33
- data/test/fixtures/apidae/references.yml +11 -11
- data/test/fixtures/apidae/selection_objects.yml +9 -9
- data/test/fixtures/apidae/selections.yml +11 -11
- data/test/fixtures/apidae/towns.yml +15 -15
- data/test/integration/navigation_test.rb +8 -8
- data/test/models/apidae/export_test.rb +9 -9
- data/test/models/apidae/file_import_test.rb +88 -88
- data/test/models/apidae/object_test.rb +9 -9
- data/test/models/apidae/reference_test.rb +9 -9
- data/test/models/apidae/selection_object_test.rb +9 -9
- data/test/models/apidae/selection_test.rb +9 -9
- data/test/models/apidae/town_test.rb +9 -9
- data/test/test_helper.rb +22 -22
- metadata +49 -50
- data/test/dummy/log/test.log +0 -2109
@@ -1,6 +1,6 @@
|
|
1
|
-
class RemoveDescColumnsFromApidaeObjects < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
remove_column :apidae_objects, :short_desc
|
4
|
-
remove_column :apidae_objects, :long_desc
|
5
|
-
end
|
6
|
-
end
|
1
|
+
class RemoveDescColumnsFromApidaeObjects < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
remove_column :apidae_objects, :short_desc
|
4
|
+
remove_column :apidae_objects, :long_desc
|
5
|
+
end
|
6
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class AddMetaDataToApidaeReferences < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
add_column :apidae_references, :meta_data, :jsonb
|
4
|
-
end
|
5
|
-
end
|
1
|
+
class AddMetaDataToApidaeReferences < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :apidae_references, :meta_data, :jsonb
|
4
|
+
end
|
5
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class RemoveInseeCodeUnicity < ActiveRecord::Migration[5.1]
|
2
|
-
# Removed because insee_code isnt unique for foreign towns
|
3
|
-
def change
|
4
|
-
remove_index :apidae_towns, :insee_code
|
5
|
-
add_index :apidae_towns, :insee_code
|
6
|
-
end
|
7
|
-
end
|
1
|
+
class RemoveInseeCodeUnicity < ActiveRecord::Migration[5.1]
|
2
|
+
# Removed because insee_code isnt unique for foreign towns
|
3
|
+
def change
|
4
|
+
remove_index :apidae_towns, :insee_code
|
5
|
+
add_index :apidae_towns, :insee_code
|
6
|
+
end
|
7
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class DestroyAttachedFiles < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
drop_table :apidae_attached_files
|
4
|
-
end
|
5
|
-
end
|
1
|
+
class DestroyAttachedFiles < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
drop_table :apidae_attached_files
|
4
|
+
end
|
5
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class RenameObjectsToObj < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
rename_table :apidae_objects, :apidae_objs
|
4
|
-
end
|
5
|
-
end
|
1
|
+
class RenameObjectsToObj < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
rename_table :apidae_objects, :apidae_objs
|
4
|
+
end
|
5
|
+
end
|
@@ -1,5 +1,5 @@
|
|
1
|
-
class AddProjectIdToSelections < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
add_column :apidae_selections, :apidae_project_id, :integer
|
4
|
-
end
|
5
|
-
end
|
1
|
+
class AddProjectIdToSelections < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
add_column :apidae_selections, :apidae_project_id, :integer
|
4
|
+
end
|
5
|
+
end
|
@@ -1,10 +1,10 @@
|
|
1
|
-
class CreateApidaeProjects < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
create_table :apidae_projects do |t|
|
4
|
-
t.string :name
|
5
|
-
t.integer :apidae_id
|
6
|
-
t.string :api_key
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
1
|
+
class CreateApidaeProjects < ActiveRecord::Migration[5.1]
|
2
|
+
def change
|
3
|
+
create_table :apidae_projects do |t|
|
4
|
+
t.string :name
|
5
|
+
t.integer :apidae_id
|
6
|
+
t.string :api_key
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/apidae.rb
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require "apidae/engine"
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
end
|
1
|
+
require "apidae/engine"
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
end
|
data/lib/apidae/engine.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
module Apidae
|
2
|
-
class Engine < Rails::Engine
|
3
|
-
isolate_namespace Apidae
|
4
|
-
config.to_prepare do
|
5
|
-
Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
|
6
|
-
require_dependency(c)
|
7
|
-
end
|
8
|
-
end
|
9
|
-
end
|
10
|
-
end
|
1
|
+
module Apidae
|
2
|
+
class Engine < Rails::Engine
|
3
|
+
isolate_namespace Apidae
|
4
|
+
config.to_prepare do
|
5
|
+
Dir.glob(Rails.root + "app/decorators/**/*_decorator*.rb").each do |c|
|
6
|
+
require_dependency(c)
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
data/lib/apidae/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Apidae
|
2
|
-
VERSION = "0.7.
|
3
|
-
end
|
1
|
+
module Apidae
|
2
|
+
VERSION = "0.7.4"
|
3
|
+
end
|
data/lib/tasks/apidae_tasks.rake
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# desc "Explaining what the task does"
|
2
|
-
# task :apidae do
|
3
|
-
# # Task goes here
|
4
|
-
# end
|
1
|
+
# desc "Explaining what the task does"
|
2
|
+
# task :apidae do
|
3
|
+
# # Task goes here
|
4
|
+
# end
|
data/test/apidae_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class ApidaeTest < ActiveSupport::TestCase
|
4
|
-
test "truth" do
|
5
|
-
assert_kind_of Module, Apidae
|
6
|
-
end
|
7
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class ApidaeTest < ActiveSupport::TestCase
|
4
|
+
test "truth" do
|
5
|
+
assert_kind_of Module, Apidae
|
6
|
+
end
|
7
|
+
end
|
@@ -1,23 +1,23 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class ApiControllerTest < ActionDispatch::IntegrationTest
|
5
|
-
include Engine.routes.url_helpers
|
6
|
-
|
7
|
-
test "should get selection" do
|
8
|
-
get api_selection_url
|
9
|
-
assert_response :success
|
10
|
-
end
|
11
|
-
|
12
|
-
test "should get object" do
|
13
|
-
get api_object_url
|
14
|
-
assert_response :success
|
15
|
-
end
|
16
|
-
|
17
|
-
test "should get agenda" do
|
18
|
-
get api_agenda_url
|
19
|
-
assert_response :success
|
20
|
-
end
|
21
|
-
|
22
|
-
end
|
23
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class ApiControllerTest < ActionDispatch::IntegrationTest
|
5
|
+
include Engine.routes.url_helpers
|
6
|
+
|
7
|
+
test "should get selection" do
|
8
|
+
get api_selection_url
|
9
|
+
assert_response :success
|
10
|
+
end
|
11
|
+
|
12
|
+
test "should get object" do
|
13
|
+
get api_object_url
|
14
|
+
assert_response :success
|
15
|
+
end
|
16
|
+
|
17
|
+
test "should get agenda" do
|
18
|
+
get api_agenda_url
|
19
|
+
assert_response :success
|
20
|
+
end
|
21
|
+
|
22
|
+
end
|
23
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class DashboardControllerTest < ActionController::TestCase
|
5
|
-
setup do
|
6
|
-
@routes = Engine.routes
|
7
|
-
end
|
8
|
-
|
9
|
-
test "should get index" do
|
10
|
-
get :index
|
11
|
-
assert_response :success
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class DashboardControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@routes = Engine.routes
|
7
|
+
end
|
8
|
+
|
9
|
+
test "should get index" do
|
10
|
+
get :index
|
11
|
+
assert_response :success
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class Apidae::ImportControllerTest < ActionController::TestCase
|
5
|
-
setup do
|
6
|
-
@routes = Engine.routes
|
7
|
-
end
|
8
|
-
|
9
|
-
test "should get callback" do
|
10
|
-
get :callback
|
11
|
-
assert_response :success
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class Apidae::ImportControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@routes = Engine.routes
|
7
|
+
end
|
8
|
+
|
9
|
+
test "should get callback" do
|
10
|
+
get :callback
|
11
|
+
assert_response :success
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -1,52 +1,52 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class ObjectsControllerTest < ActionController::TestCase
|
5
|
-
setup do
|
6
|
-
@object = apidae_objects(:one)
|
7
|
-
@routes = Engine.routes
|
8
|
-
end
|
9
|
-
|
10
|
-
test "should get index" do
|
11
|
-
get :index
|
12
|
-
assert_response :success
|
13
|
-
assert_not_nil assigns(:objects)
|
14
|
-
end
|
15
|
-
|
16
|
-
test "should get new" do
|
17
|
-
get :new
|
18
|
-
assert_response :success
|
19
|
-
end
|
20
|
-
|
21
|
-
test "should create object" do
|
22
|
-
assert_difference('Object.count') do
|
23
|
-
post :create, object: { address: @object.address, apidae_id: @object.apidae_id, apidae_subtype: @object.apidae_subtype, apidae_type: @object.apidae_type, contact: @object.contact, latitude: @object.latitude, long_desc: @object.long_desc, longitude: @object.longitude, openings: @object.openings, rates: @object.rates, reservation: @object.reservation, short_desc: @object.short_desc, title: @object.title, type_data: @object.type_data }
|
24
|
-
end
|
25
|
-
|
26
|
-
assert_redirected_to object_path(assigns(:object))
|
27
|
-
end
|
28
|
-
|
29
|
-
test "should show object" do
|
30
|
-
get :show, id: @object
|
31
|
-
assert_response :success
|
32
|
-
end
|
33
|
-
|
34
|
-
test "should get edit" do
|
35
|
-
get :edit, id: @object
|
36
|
-
assert_response :success
|
37
|
-
end
|
38
|
-
|
39
|
-
test "should update object" do
|
40
|
-
patch :update, id: @object, object: { address: @object.address, apidae_id: @object.apidae_id, apidae_subtype: @object.apidae_subtype, apidae_type: @object.apidae_type, contact: @object.contact, latitude: @object.latitude, long_desc: @object.long_desc, longitude: @object.longitude, openings: @object.openings, rates: @object.rates, reservation: @object.reservation, short_desc: @object.short_desc, title: @object.title, type_data: @object.type_data }
|
41
|
-
assert_redirected_to object_path(assigns(:object))
|
42
|
-
end
|
43
|
-
|
44
|
-
test "should destroy object" do
|
45
|
-
assert_difference('Object.count', -1) do
|
46
|
-
delete :destroy, id: @object
|
47
|
-
end
|
48
|
-
|
49
|
-
assert_redirected_to objects_path
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class ObjectsControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@object = apidae_objects(:one)
|
7
|
+
@routes = Engine.routes
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should get index" do
|
11
|
+
get :index
|
12
|
+
assert_response :success
|
13
|
+
assert_not_nil assigns(:objects)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get new" do
|
17
|
+
get :new
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should create object" do
|
22
|
+
assert_difference('Object.count') do
|
23
|
+
post :create, object: { address: @object.address, apidae_id: @object.apidae_id, apidae_subtype: @object.apidae_subtype, apidae_type: @object.apidae_type, contact: @object.contact, latitude: @object.latitude, long_desc: @object.long_desc, longitude: @object.longitude, openings: @object.openings, rates: @object.rates, reservation: @object.reservation, short_desc: @object.short_desc, title: @object.title, type_data: @object.type_data }
|
24
|
+
end
|
25
|
+
|
26
|
+
assert_redirected_to object_path(assigns(:object))
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should show object" do
|
30
|
+
get :show, id: @object
|
31
|
+
assert_response :success
|
32
|
+
end
|
33
|
+
|
34
|
+
test "should get edit" do
|
35
|
+
get :edit, id: @object
|
36
|
+
assert_response :success
|
37
|
+
end
|
38
|
+
|
39
|
+
test "should update object" do
|
40
|
+
patch :update, id: @object, object: { address: @object.address, apidae_id: @object.apidae_id, apidae_subtype: @object.apidae_subtype, apidae_type: @object.apidae_type, contact: @object.contact, latitude: @object.latitude, long_desc: @object.long_desc, longitude: @object.longitude, openings: @object.openings, rates: @object.rates, reservation: @object.reservation, short_desc: @object.short_desc, title: @object.title, type_data: @object.type_data }
|
41
|
+
assert_redirected_to object_path(assigns(:object))
|
42
|
+
end
|
43
|
+
|
44
|
+
test "should destroy object" do
|
45
|
+
assert_difference('Object.count', -1) do
|
46
|
+
delete :destroy, id: @object
|
47
|
+
end
|
48
|
+
|
49
|
+
assert_redirected_to objects_path
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
@@ -1,13 +1,13 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class ReferencesControllerTest < ActionDispatch::IntegrationTest
|
5
|
-
include Engine.routes.url_helpers
|
6
|
-
|
7
|
-
test "should get index" do
|
8
|
-
get apidae_references_index_url
|
9
|
-
assert_response :success
|
10
|
-
end
|
11
|
-
|
12
|
-
end
|
13
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class ReferencesControllerTest < ActionDispatch::IntegrationTest
|
5
|
+
include Engine.routes.url_helpers
|
6
|
+
|
7
|
+
test "should get index" do
|
8
|
+
get apidae_references_index_url
|
9
|
+
assert_response :success
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
end
|
@@ -1,52 +1,52 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
module Apidae
|
4
|
-
class SelectionsControllerTest < ActionController::TestCase
|
5
|
-
setup do
|
6
|
-
@selection = apidae_selections(:one)
|
7
|
-
@routes = Engine.routes
|
8
|
-
end
|
9
|
-
|
10
|
-
test "should get index" do
|
11
|
-
get :index
|
12
|
-
assert_response :success
|
13
|
-
assert_not_nil assigns(:selections)
|
14
|
-
end
|
15
|
-
|
16
|
-
test "should get new" do
|
17
|
-
get :new
|
18
|
-
assert_response :success
|
19
|
-
end
|
20
|
-
|
21
|
-
test "should create selection" do
|
22
|
-
assert_difference('Selection.count') do
|
23
|
-
post :create, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference }
|
24
|
-
end
|
25
|
-
|
26
|
-
assert_redirected_to selection_path(assigns(:selection))
|
27
|
-
end
|
28
|
-
|
29
|
-
test "should show selection" do
|
30
|
-
get :show, id: @selection
|
31
|
-
assert_response :success
|
32
|
-
end
|
33
|
-
|
34
|
-
test "should get edit" do
|
35
|
-
get :edit, id: @selection
|
36
|
-
assert_response :success
|
37
|
-
end
|
38
|
-
|
39
|
-
test "should update selection" do
|
40
|
-
patch :update, id: @selection, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference }
|
41
|
-
assert_redirected_to selection_path(assigns(:selection))
|
42
|
-
end
|
43
|
-
|
44
|
-
test "should destroy selection" do
|
45
|
-
assert_difference('Selection.count', -1) do
|
46
|
-
delete :destroy, id: @selection
|
47
|
-
end
|
48
|
-
|
49
|
-
assert_redirected_to selections_path
|
50
|
-
end
|
51
|
-
end
|
52
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
module Apidae
|
4
|
+
class SelectionsControllerTest < ActionController::TestCase
|
5
|
+
setup do
|
6
|
+
@selection = apidae_selections(:one)
|
7
|
+
@routes = Engine.routes
|
8
|
+
end
|
9
|
+
|
10
|
+
test "should get index" do
|
11
|
+
get :index
|
12
|
+
assert_response :success
|
13
|
+
assert_not_nil assigns(:selections)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "should get new" do
|
17
|
+
get :new
|
18
|
+
assert_response :success
|
19
|
+
end
|
20
|
+
|
21
|
+
test "should create selection" do
|
22
|
+
assert_difference('Selection.count') do
|
23
|
+
post :create, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference }
|
24
|
+
end
|
25
|
+
|
26
|
+
assert_redirected_to selection_path(assigns(:selection))
|
27
|
+
end
|
28
|
+
|
29
|
+
test "should show selection" do
|
30
|
+
get :show, id: @selection
|
31
|
+
assert_response :success
|
32
|
+
end
|
33
|
+
|
34
|
+
test "should get edit" do
|
35
|
+
get :edit, id: @selection
|
36
|
+
assert_response :success
|
37
|
+
end
|
38
|
+
|
39
|
+
test "should update selection" do
|
40
|
+
patch :update, id: @selection, selection: { apidae_id: @selection.apidae_id, label: @selection.label, reference: @selection.reference }
|
41
|
+
assert_redirected_to selection_path(assigns(:selection))
|
42
|
+
end
|
43
|
+
|
44
|
+
test "should destroy selection" do
|
45
|
+
assert_difference('Selection.count', -1) do
|
46
|
+
delete :destroy, id: @selection
|
47
|
+
end
|
48
|
+
|
49
|
+
assert_redirected_to selections_path
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|