we_bridge_rails_engine_orgs 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/Gemfile +34 -0
- data/Gemfile.lock +251 -0
- data/LICENSE.txt +21 -0
- data/MIT-LICENSE +20 -0
- data/README.md +41 -0
- data/README.rdoc +3 -0
- data/Rakefile +37 -0
- data/app/assets/javascripts/org_activities.js +2 -0
- data/app/assets/javascripts/org_branches.js +2 -0
- data/app/assets/javascripts/org_director_types.js +2 -0
- data/app/assets/javascripts/org_directors.js +2 -0
- data/app/assets/javascripts/org_member_tags.js +2 -0
- data/app/assets/javascripts/org_member_types.js +2 -0
- data/app/assets/javascripts/org_members.js +2 -0
- data/app/assets/javascripts/orgs.js +2 -0
- data/app/assets/stylesheets/org_activities.css +4 -0
- data/app/assets/stylesheets/org_branches.css +4 -0
- data/app/assets/stylesheets/org_director_types.css +4 -0
- data/app/assets/stylesheets/org_directors.css +4 -0
- data/app/assets/stylesheets/org_member_tags.css +4 -0
- data/app/assets/stylesheets/org_member_types.css +4 -0
- data/app/assets/stylesheets/org_members.css +4 -0
- data/app/assets/stylesheets/orgs.css +4 -0
- data/app/assets/stylesheets/scaffold.css +56 -0
- data/app/controllers/org_activities_controller.rb +8 -0
- data/app/controllers/org_branch_types_controller.rb +9 -0
- data/app/controllers/org_branches_controller.rb +9 -0
- data/app/controllers/org_director_types_controller.rb +8 -0
- data/app/controllers/org_directors_controller.rb +8 -0
- data/app/controllers/org_member_tags_controller.rb +8 -0
- data/app/controllers/org_member_types_controller.rb +8 -0
- data/app/controllers/org_members_controller.rb +8 -0
- data/app/controllers/orgs_controller.rb +8 -0
- data/app/helpers/org_activities_helper.rb +2 -0
- data/app/helpers/org_branches_helper.rb +2 -0
- data/app/helpers/org_director_types_helper.rb +2 -0
- data/app/helpers/org_directors_helper.rb +2 -0
- data/app/helpers/org_member_tags_helper.rb +2 -0
- data/app/helpers/org_member_types_helper.rb +2 -0
- data/app/helpers/org_members_helper.rb +2 -0
- data/app/helpers/orgs_helper.rb +2 -0
- data/app/mailers/.keep +0 -0
- data/app/models/.keep +0 -0
- data/app/models/org.rb +11 -0
- data/app/models/org_activity.rb +8 -0
- data/app/models/org_activity_text.rb +7 -0
- data/app/models/org_branch.rb +9 -0
- data/app/models/org_branch_member_mapping.rb +4 -0
- data/app/models/org_branch_text.rb +8 -0
- data/app/models/org_branch_type.rb +11 -0
- data/app/models/org_branch_type_text.rb +9 -0
- data/app/models/org_director_type.rb +11 -0
- data/app/models/org_director_type_text.rb +8 -0
- data/app/models/org_member.rb +28 -0
- data/app/models/org_member_tag.rb +8 -0
- data/app/models/org_member_tag_mapping.rb +5 -0
- data/app/models/org_member_tag_text.rb +7 -0
- data/app/models/org_member_text.rb +22 -0
- data/app/models/org_member_type.rb +11 -0
- data/app/models/org_member_type_text.rb +8 -0
- data/app/models/org_text.rb +7 -0
- data/app/views/.keep +0 -0
- data/app/views/common/_edit.html.builder +2 -0
- data/app/views/common/_index.html.builder +1 -0
- data/app/views/common/_new.html.builder +1 -0
- data/app/views/common/_show.html.builder +1 -0
- data/app/views/org_activities/edit.html.builder +1 -0
- data/app/views/org_activities/index.html.builder +1 -0
- data/app/views/org_activities/new.html.builder +1 -0
- data/app/views/org_activities/show.html.builder +9 -0
- data/app/views/org_branch_types/edit.html.builder +1 -0
- data/app/views/org_branch_types/index.html.builder +1 -0
- data/app/views/org_branch_types/new.html.builder +1 -0
- data/app/views/org_branch_types/show.html.builder +9 -0
- data/app/views/org_branches/edit.html.builder +1 -0
- data/app/views/org_branches/index.html.builder +1 -0
- data/app/views/org_branches/new.html.builder +1 -0
- data/app/views/org_branches/show.html.builder +9 -0
- data/app/views/org_director_types/_form.html.builder +14 -0
- data/app/views/org_director_types/edit.html.builder +1 -0
- data/app/views/org_director_types/index.html.builder +1 -0
- data/app/views/org_director_types/new.html.builder +1 -0
- data/app/views/org_director_types/show.html.builder +9 -0
- data/app/views/org_directors/edit.html.builder +1 -0
- data/app/views/org_directors/index.html.builder +1 -0
- data/app/views/org_directors/new.html.builder +1 -0
- data/app/views/org_directors/show.html.builder +9 -0
- data/app/views/org_member_tags/edit.html.builder +1 -0
- data/app/views/org_member_tags/index.html.builder +1 -0
- data/app/views/org_member_tags/new.html.builder +1 -0
- data/app/views/org_member_tags/show.html.builder +9 -0
- data/app/views/org_member_types/edit.html.builder +1 -0
- data/app/views/org_member_types/index.html.builder +1 -0
- data/app/views/org_member_types/new.html.builder +1 -0
- data/app/views/org_member_types/show.html.builder +9 -0
- data/app/views/org_members/edit.html.builder +1 -0
- data/app/views/org_members/index.html.builder +1 -0
- data/app/views/org_members/new.html.builder +1 -0
- data/app/views/org_members/show.html.builder +9 -0
- data/app/views/orgs/edit.html.builder +1 -0
- data/app/views/orgs/index.html.builder +1 -0
- data/app/views/orgs/new.html.builder +1 -0
- data/app/views/orgs/show.html.builder +13 -0
- data/bin/console +14 -0
- data/bin/rails +12 -0
- data/bin/setup +7 -0
- data/config/routes.rb +11 -0
- data/db/migrate/20150812025526_create_orgs.rb +122 -0
- data/db/migrate/20150814183339_create_org_branches_table.rb +31 -0
- data/lib/tasks/we_bridge_rails_engine_orgs_tasks.rake +4 -0
- data/lib/we_bridge_rails_engine_orgs/engine.rb +13 -0
- data/lib/we_bridge_rails_engine_orgs/version.rb +3 -0
- data/lib/we_bridge_rails_engine_orgs.rb +7 -0
- data/spec/controllers/org_activities_controller_spec.rb +159 -0
- data/spec/controllers/org_branches_controller_spec.rb +159 -0
- data/spec/controllers/org_director_types_controller_spec.rb +159 -0
- data/spec/controllers/org_directors_controller_spec.rb +159 -0
- data/spec/controllers/org_member_tags_controller_spec.rb +159 -0
- data/spec/controllers/org_member_types_controller_spec.rb +159 -0
- data/spec/controllers/org_members_controller_spec.rb +159 -0
- data/spec/controllers/orgs_controller_spec.rb +159 -0
- data/spec/dummy/README.rdoc +28 -0
- data/spec/dummy/Rakefile +6 -0
- data/spec/dummy/app/assets/javascripts/application.js +16 -0
- data/spec/dummy/app/assets/stylesheets/application.css +15 -0
- data/spec/dummy/app/controllers/application_controller.rb +8 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.builder +14 -0
- data/spec/dummy/bin/bundle +3 -0
- data/spec/dummy/bin/rails +4 -0
- data/spec/dummy/bin/rake +4 -0
- data/spec/dummy/bin/setup +29 -0
- data/spec/dummy/config/application.rb +28 -0
- data/spec/dummy/config/boot.rb +5 -0
- data/spec/dummy/config/database.yml +25 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +41 -0
- data/spec/dummy/config/environments/production.rb +79 -0
- data/spec/dummy/config/environments/test.rb +42 -0
- data/spec/dummy/config/initializers/assets.rb +11 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/cookies_serializer.rb +3 -0
- data/spec/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/spec/dummy/config/initializers/inflections.rb +16 -0
- data/spec/dummy/config/initializers/mime_types.rb +4 -0
- data/spec/dummy/config/initializers/provider_settings.rb +2 -0
- data/spec/dummy/config/initializers/session_store.rb +3 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/spec/dummy/config/locales/en.yml +23 -0
- data/spec/dummy/config/omniauth.yml +63 -0
- data/spec/dummy/config/omniauth.yml.org +63 -0
- data/spec/dummy/config/routes.rb +56 -0
- data/spec/dummy/config/secrets.yml +22 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/schema.rb +305 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/development.log +12006 -0
- data/spec/dummy/log/test.log +154 -0
- data/spec/dummy/public/404.html +67 -0
- data/spec/dummy/public/422.html +67 -0
- data/spec/dummy/public/500.html +66 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/0BZmBV4GBBP2mXT-Bq5KS4qdbAh_4G6nOtgCtrH4rNE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/1RRK_DyUgv8T2sFbYEG6n6-JvG3xMvlZCTYWyE_cCXU.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/1bGL2UVgPNGIpbmIxMm7Zhqz1S3_5E_-hemJChBQYKI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/2fgp297hCEN9mggAbqDhssSSfNQbXHLAGYHRcoeNyMQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/5Lly_CA8DZvPhQV2jDQx-Y6P_y3Ygra9t5jfSlGhHDA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/5sfZJfc-8-coZsxWhnG7QNi9QbTQm3LuCvHanza6jVY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/6jIW5_LzHTeo0nHF3f7SOdaqy3yT35x4obLjMhvkbRQ.cache +2 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/86j6jf2oNNPSVkHMTuUJoZzGYHNEvWwMfSIAh-Q_wiI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/8NqLvJ5MoVa0NPxGOKngFS4ZRsnGK6IQfHkl-U1MUrI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/C8MAmSRXsJWbTeXMvLqOrrhN_KnBi0ut8iX91fZnhLg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/DiLk-rAzABNB75ElsvKdP_Eh-V_KblIbr3U3QclyF0o.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/E8HcM2aVb1dScqT08oJRlNyfgM0-iVkTDyQcN7cddF4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/FBJ-onmDShvDUhlQ7Jacn1hS_Nju3dClO7O861-e8q8.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Fwk7r3eAJYuVAYg8_pGI1Vj1UZbV-jPP93SpN8tJyPs.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/GTfNHEYnjfZXZHTGQSuEEiuCakM6lcHxCCLoBYzvdew.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HI4BM29XxjwMtmmewg36qsoObiRYy2V2GI09aG1y_EE.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/HamVqV58DQAmEiKhvw9Ng_7mraOj8HKyOMsDQM19PxM.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/JigkThideDLksj6ZrufTx6bLVyJBmNDbaouRbMbZdIA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/N_o3GYuVrQiNLiqimWjkHB5CJHSCC7K3Hno-XiBGa7A.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/OAgB7vSwYbsD10H3ox3vY1aEH-zUkcjF8v9YwW6EJbY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/OI6uxGcnsKavdWTtwDAasU3wPx8QXhzBgV0X2n1KjMQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/QYjdvCmvd_aP40208t6tH0TukGVp8vqM6esnnFq0cOA.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/R7QFe2khKmUZgHX-_me15tkaeNQw9v3-d_dThxjrU8s.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/S8xObcvQGG6uj1eqGy7IvL5j3qNf9tunwD6OjNQIB_8.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/SDsevrzzr3Ytog2iS84FzNXGgIU7sSQkTWTIIum4coo.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UDhlEjeIR7r4grFS_AeYBTYse5F7Ojju8yu0mScz6Ic.cache +2 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/UEflM8eWRGnUEhwM2m8ZvJv1Xc807SwOZ_gUoQRxdT4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/VFEdJXCIVpXWqIFcfWoPj_KqrOCNWZ7fppjVRBFQmag.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Vs2R-eMvzDzqjlKluRmPf0JVhvWU7R94DRz7Jphhnzg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XBt_bibQOuIG9ocaYQmJsmtJgd5BcrZ4jQ68t-439zQ.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/XDmpnnquS4XMFZuvuyM7io3FX2wkqXIzkTerm72ZDdo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/Z9_T0XrFi2IVgHl_2slv4wpbdSa0EhpECdvLA25u9O0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/a1JHimmgPvl2EuwWDMR4OlNpJV4TufqgTpOi7Sy0TsI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/a6-MgFZdmmAL52ip1yli2iaKu4zRihIVZZPsQUaxpqI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/axFrxpUG59UHCdeJI4Kl3eOyLcRfl9uCRRi6NAgMaI4.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/bme2_XB4XKGqohc1KW9Gqe-LXNbANY7bwm9oZGHaTwI.cache +3 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/c1nFo3JnHLdXWKWgLVt9jmiCmEQ2ndPoUTjNv1M1OkI.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/cnXDDro8GJGKj_nlcBqX9sLGgT-w0JARPjWS5VCIRSw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/dDi4KC6wzIbiwfTi_E35Zl4Z_lErkg6q_6FK30kZLTo.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/eN4oUfIofrNhih1pDOVXB84IYQMEcgduHwZPSqnwIjw.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gDicoS8YCD-tJz--CXIF0afhT0rq6D_LLCh0GE7G2HI.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gDw6ULoqC7Ox2nerE01WVLVgc9XbR1WbPL-VjhbPkCA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gRVM3WJ-shebeFmALsY4niZWEYbbzCrGP9LisSCLifg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/gVx-CmBVKIeSliU7Zb8RSFta76qvQCx1VUJhqedZdz4.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/jDLYA3YpFOlifBm6AHj2J8jeacy_iljBTonj_mhod6I.cache +2 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/nawE49iR8fvD7PVmDVPX_qvJCAobi3MSVVgcnibd_oQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ndmZMkzdU4-m13TcmfViszPUFu-0O_xNyv1lTqtHhkQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/oMnDzGezNNiIYic9SdXkm-yjJdYaCl7m2bHnlaFl9wg.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/pzdXCzT9_-bzrPIElwqWhFt9ELoAUNtEizmWb1Tgufk.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/qQhBmQ4Iwrq-oIoV6CDEB9cTt4CUDyDE6u4t9-Nz1aY.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/qzfkRg1kuNevdpfIf5kcR1-9Q4buHB1dxcl03OT5iao.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/s7AiRxV9LdOVAylAE38RiKCstOIGXxlkhZ15nV8_GfY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/t3Nl1ub-k4CMd3OQC_Hmp23_aD9smrJFrL0FzajnCMk.cache +2 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/u6G1NYM-f-jAFL4fAGAvCvyNa2T448YXFBCB2r6LPvA.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/uBJ2DBMKAov-3rDsEAsHb0PVg0dOFcff9i0e4ESOs6c.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wHu7ynIgCKw1GeI1xvWayqO05ZrBt_eukD-Fx249ZZ0.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/wdVqCI5gqjc-qNnqeJ80WppA6paXIB4-ovEETxHP91k.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xVM8A6y2-lU8UBw4lpLNUNMKB-LwwH01oZBu8TjnnSY.cache +0 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/xz0KN1Vpbne-X0aKg8iepHDn2X6_soUrkNmrQwCgPpQ.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/ysBC3QUuPfkgfYV3nBpTw_znt9DtKC5I7erWmLCPTCM.cache +1 -0
- data/spec/dummy/tmp/cache/assets/development/sprockets/v3.0/zd_YJiP9IEPD6jymqPu1CaH2XP0-m5SZBe9uLiYqMLI.cache +1 -0
- data/spec/dummy/tmp/pids/server.pid +1 -0
- data/spec/factories/org_activities.rb +6 -0
- data/spec/factories/org_branches.rb +6 -0
- data/spec/factories/org_director_types.rb +6 -0
- data/spec/factories/org_directors.rb +6 -0
- data/spec/factories/org_member_tags.rb +6 -0
- data/spec/factories/org_member_types.rb +6 -0
- data/spec/factories/org_members.rb +6 -0
- data/spec/factories/orgs.rb +6 -0
- data/spec/helpers/org_activities_helper_spec.rb +15 -0
- data/spec/helpers/org_branches_helper_spec.rb +15 -0
- data/spec/helpers/org_director_types_helper_spec.rb +15 -0
- data/spec/helpers/org_directors_helper_spec.rb +15 -0
- data/spec/helpers/org_member_tags_helper_spec.rb +15 -0
- data/spec/helpers/org_member_types_helper_spec.rb +15 -0
- data/spec/helpers/org_members_helper_spec.rb +15 -0
- data/spec/helpers/orgs_helper_spec.rb +15 -0
- data/spec/models/org_activity_spec.rb +5 -0
- data/spec/models/org_branch_spec.rb +5 -0
- data/spec/models/org_director_spec.rb +5 -0
- data/spec/models/org_director_type_spec.rb +5 -0
- data/spec/models/org_member_spec.rb +5 -0
- data/spec/models/org_member_tag_spec.rb +5 -0
- data/spec/models/org_member_type_spec.rb +5 -0
- data/spec/models/org_spec.rb +5 -0
- data/spec/omniauth.yml +63 -0
- data/spec/rails_helper.rb +54 -0
- data/spec/routing/org_activities_routing_spec.rb +39 -0
- data/spec/routing/org_branches_routing_spec.rb +39 -0
- data/spec/routing/org_director_types_routing_spec.rb +39 -0
- data/spec/routing/org_directors_routing_spec.rb +39 -0
- data/spec/routing/org_member_tags_routing_spec.rb +39 -0
- data/spec/routing/org_member_types_routing_spec.rb +39 -0
- data/spec/routing/org_members_routing_spec.rb +39 -0
- data/spec/routing/orgs_routing_spec.rb +39 -0
- data/spec/spec_helper.rb +2 -0
- data/spec/views/org_activities/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_activities/index.html.builder_spec.rb +14 -0
- data/spec/views/org_activities/new.html.builder_spec.rb +14 -0
- data/spec/views/org_activities/show.html.builder_spec.rb +11 -0
- data/spec/views/org_branches/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_branches/index.html.builder_spec.rb +14 -0
- data/spec/views/org_branches/new.html.builder_spec.rb +14 -0
- data/spec/views/org_branches/show.html.builder_spec.rb +11 -0
- data/spec/views/org_director_types/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_director_types/index.html.builder_spec.rb +14 -0
- data/spec/views/org_director_types/new.html.builder_spec.rb +14 -0
- data/spec/views/org_director_types/show.html.builder_spec.rb +11 -0
- data/spec/views/org_directors/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_directors/index.html.builder_spec.rb +14 -0
- data/spec/views/org_directors/new.html.builder_spec.rb +14 -0
- data/spec/views/org_directors/show.html.builder_spec.rb +11 -0
- data/spec/views/org_member_tags/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_member_tags/index.html.builder_spec.rb +14 -0
- data/spec/views/org_member_tags/new.html.builder_spec.rb +14 -0
- data/spec/views/org_member_tags/show.html.builder_spec.rb +11 -0
- data/spec/views/org_member_types/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_member_types/index.html.builder_spec.rb +14 -0
- data/spec/views/org_member_types/new.html.builder_spec.rb +14 -0
- data/spec/views/org_member_types/show.html.builder_spec.rb +11 -0
- data/spec/views/org_members/edit.html.builder_spec.rb +14 -0
- data/spec/views/org_members/index.html.builder_spec.rb +14 -0
- data/spec/views/org_members/new.html.builder_spec.rb +14 -0
- data/spec/views/org_members/show.html.builder_spec.rb +11 -0
- data/spec/views/orgs/edit.html.builder_spec.rb +14 -0
- data/spec/views/orgs/index.html.builder_spec.rb +14 -0
- data/spec/views/orgs/new.html.builder_spec.rb +14 -0
- data/spec/views/orgs/show.html.builder_spec.rb +11 -0
- data/spec/we_bridge_rails_engine_orgs_spec.rb +11 -0
- data/we_bridge_rails_engine_orgs.gemspec +43 -0
- metadata +690 -0
@@ -0,0 +1,122 @@
|
|
1
|
+
class CreateOrgs < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "orgs" do |t|
|
4
|
+
t.integer :lang_id, null: false
|
5
|
+
t.string "email"
|
6
|
+
t.string "url"
|
7
|
+
t.string "domain"
|
8
|
+
t.date "started_on"
|
9
|
+
t.string :post_number
|
10
|
+
t.string :tel
|
11
|
+
t.timestamps null: false
|
12
|
+
end
|
13
|
+
|
14
|
+
create_table "org_texts" do |t|
|
15
|
+
t.integer :parent_id, null: false
|
16
|
+
t.integer :lang_id, null: false
|
17
|
+
t.string :name
|
18
|
+
t.text :description
|
19
|
+
t.string :www_author
|
20
|
+
t.string :www_keywords
|
21
|
+
t.string :address
|
22
|
+
t.timestamps null: false
|
23
|
+
end
|
24
|
+
add_index :org_texts, [:lang_id,:parent_id], unique: true, name: :index_org_texts
|
25
|
+
|
26
|
+
create_table :org_activities do |t|
|
27
|
+
t.integer :org_id , null: false
|
28
|
+
t.timestamps null: false
|
29
|
+
end
|
30
|
+
|
31
|
+
create_table :org_activity_texts do |t|
|
32
|
+
t.integer :parent_id, null: false
|
33
|
+
t.integer :lang_id, null: false
|
34
|
+
t.string :label, null: false
|
35
|
+
t.text :description
|
36
|
+
t.timestamps null: false
|
37
|
+
end
|
38
|
+
add_index :org_activity_texts, [:lang_id,:parent_id], unique: true
|
39
|
+
|
40
|
+
create_table "org_members" do |t|
|
41
|
+
t.integer :org_id, null: true
|
42
|
+
t.integer :user_id, null: true
|
43
|
+
t.integer :lang_id, null: true
|
44
|
+
t.integer "type_id", default: 0, null: false
|
45
|
+
t.integer "org_director_type_id"
|
46
|
+
t.integer "org_member_type_id"
|
47
|
+
t.integer "byear"
|
48
|
+
t.integer "bmonth"
|
49
|
+
t.integer "bday"
|
50
|
+
t.date "entried_on", null: false
|
51
|
+
t.integer "sex", limit: 1
|
52
|
+
t.datetime "expire_at"
|
53
|
+
t.date :retired_on, null: true
|
54
|
+
t.string "handle_name"
|
55
|
+
t.timestamps null: false
|
56
|
+
end
|
57
|
+
|
58
|
+
create_table "org_member_texts" do |t|
|
59
|
+
t.integer :parent_id, null: false
|
60
|
+
t.integer :lang_id, null: false
|
61
|
+
t.string "family_name"
|
62
|
+
t.string "given_name"
|
63
|
+
t.string "family_name_pron"
|
64
|
+
t.string "given_name_pron"
|
65
|
+
t.text "comment"
|
66
|
+
t.string "comment_format", null: true
|
67
|
+
t.timestamps null: false
|
68
|
+
end
|
69
|
+
add_index :org_member_texts, [:lang_id,:parent_id], unique: true
|
70
|
+
|
71
|
+
create_table "org_member_types" do |t|
|
72
|
+
t.integer :org_id, null: false
|
73
|
+
t.integer "position", default: 0, null: false
|
74
|
+
t.timestamps null: false
|
75
|
+
end
|
76
|
+
|
77
|
+
create_table "org_member_type_texts" do |t|
|
78
|
+
t.integer :parent_id, null: false
|
79
|
+
t.integer :lang_id, null: false
|
80
|
+
t.string "label"
|
81
|
+
t.text "desc"
|
82
|
+
t.timestamps null: false
|
83
|
+
end
|
84
|
+
add_index :org_member_type_texts, [:lang_id,:parent_id], unique: true
|
85
|
+
|
86
|
+
create_table "org_member_tags" do |t|
|
87
|
+
t.integer :org_id, null: false
|
88
|
+
t.timestamps null: false
|
89
|
+
end
|
90
|
+
|
91
|
+
create_table "org_member_tag_texts" do |t|
|
92
|
+
t.integer :parent_id, null: false
|
93
|
+
t.integer :lang_id, null: false
|
94
|
+
t.string "label"
|
95
|
+
t.timestamps null: false
|
96
|
+
end
|
97
|
+
add_index :org_member_tag_texts, [:lang_id,:parent_id], unique: true
|
98
|
+
|
99
|
+
create_table "org_member_tag_mappings" do |t|
|
100
|
+
t.integer :org_member_tag_id, null: false
|
101
|
+
t.integer :org_member_id, null: false
|
102
|
+
t.timestamps null: false
|
103
|
+
end
|
104
|
+
add_index :org_member_tag_mappings, [:org_member_tag_id,:org_member_id], unique: true, name: :index_org_member_tag_mappings
|
105
|
+
|
106
|
+
create_table "org_director_types" do |t|
|
107
|
+
t.integer :org_id, null: false
|
108
|
+
t.integer "position", default: 0, null: false
|
109
|
+
t.integer :limit, null: false, default: 0
|
110
|
+
t.timestamps null: false
|
111
|
+
end
|
112
|
+
|
113
|
+
create_table "org_director_type_texts" do |t|
|
114
|
+
t.integer :parent_id, null: false
|
115
|
+
t.integer :lang_id, null: false
|
116
|
+
t.string "label"
|
117
|
+
t.text "desc"
|
118
|
+
t.timestamps null: false
|
119
|
+
end
|
120
|
+
add_index :org_director_type_texts, [:parent_id,:lang_id], unique: true
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
class CreateOrgBranchesTable < ActiveRecord::Migration
|
2
|
+
def change
|
3
|
+
create_table "org_branch_types", force: true do |t|
|
4
|
+
end
|
5
|
+
|
6
|
+
create_table "org_branch_type_texts", force: true do |t|
|
7
|
+
t.integer :parent_id, null: false
|
8
|
+
t.integer :lang_id, null: false
|
9
|
+
t.string "label"
|
10
|
+
end
|
11
|
+
add_index :org_branch_type_texts, [:parent_id,:lang_id], unique: true, name: :index_org_branch_type_texts
|
12
|
+
|
13
|
+
create_table "org_branches" do |t|
|
14
|
+
t.integer "org_branch_type_id", null: false
|
15
|
+
end
|
16
|
+
|
17
|
+
create_table "org_branch_texts" do |t|
|
18
|
+
t.integer :parent_id, null: false
|
19
|
+
t.integer :lang_id, null: false
|
20
|
+
t.string "name"
|
21
|
+
end
|
22
|
+
add_index :org_branch_texts, [:parent_id,:lang_id], unique: true, name: :index_org_branch_texts
|
23
|
+
|
24
|
+
create_table "org_branch_member_mappings" do |t|
|
25
|
+
t.integer :org_member_id, null: false
|
26
|
+
t.integer :org_branch_id, null: false
|
27
|
+
t.timestamps null: false
|
28
|
+
end
|
29
|
+
add_index :org_branch_member_mappings, [:org_member_id,:org_branch_id], unique: true, name: :index_org_branch_member_mappings
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module WeBridgeRailsEngineOrgs
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
config.generators do |g|
|
4
|
+
g.test_framework :rspec, fixture: false, view_specs: true, helper_specs: true, controller_specs: true, request_specs: true, route_specs: true, model_specs: true
|
5
|
+
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
|
6
|
+
g.template_engine :builder
|
7
|
+
g.assets true
|
8
|
+
g.helper true
|
9
|
+
g.stylesheets true
|
10
|
+
g.javascripts true
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,159 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
+
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
+
# was generated by Rails when you ran the scaffold generator.
|
6
|
+
#
|
7
|
+
# It assumes that the implementation code is generated by the rails scaffold
|
8
|
+
# generator. If you are using any extension libraries to generate different
|
9
|
+
# controller code, this generated spec may or may not pass.
|
10
|
+
#
|
11
|
+
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
12
|
+
# of tools you can use to make these specs even more expressive, but we're
|
13
|
+
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
14
|
+
#
|
15
|
+
# Compared to earlier versions of this generator, there is very limited use of
|
16
|
+
# stubs and message expectations in this spec. Stubs are only used when there
|
17
|
+
# is no simpler way to get a handle on the object needed for the example.
|
18
|
+
# Message expectations are only used when there is no simpler way to specify
|
19
|
+
# that an instance is receiving a specific message.
|
20
|
+
|
21
|
+
RSpec.describe OrgActivitiesController, type: :controller do
|
22
|
+
|
23
|
+
# This should return the minimal set of attributes required to create a valid
|
24
|
+
# OrgActivity. As you add validations to OrgActivity, be sure to
|
25
|
+
# adjust the attributes here as well.
|
26
|
+
let(:valid_attributes) {
|
27
|
+
skip("Add a hash of attributes valid for your model")
|
28
|
+
}
|
29
|
+
|
30
|
+
let(:invalid_attributes) {
|
31
|
+
skip("Add a hash of attributes invalid for your model")
|
32
|
+
}
|
33
|
+
|
34
|
+
# This should return the minimal set of values that should be in the session
|
35
|
+
# in order to pass any filters (e.g. authentication) defined in
|
36
|
+
# OrgActivitiesController. Be sure to keep this updated too.
|
37
|
+
let(:valid_session) { {} }
|
38
|
+
|
39
|
+
describe "GET #index" do
|
40
|
+
it "assigns all org_activities as @org_activities" do
|
41
|
+
org_activity = OrgActivity.create! valid_attributes
|
42
|
+
get :index, {}, valid_session
|
43
|
+
expect(assigns(:org_activities)).to eq([org_activity])
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "GET #show" do
|
48
|
+
it "assigns the requested org_activity as @org_activity" do
|
49
|
+
org_activity = OrgActivity.create! valid_attributes
|
50
|
+
get :show, {:id => org_activity.to_param}, valid_session
|
51
|
+
expect(assigns(:org_activity)).to eq(org_activity)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "GET #new" do
|
56
|
+
it "assigns a new org_activity as @org_activity" do
|
57
|
+
get :new, {}, valid_session
|
58
|
+
expect(assigns(:org_activity)).to be_a_new(OrgActivity)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "GET #edit" do
|
63
|
+
it "assigns the requested org_activity as @org_activity" do
|
64
|
+
org_activity = OrgActivity.create! valid_attributes
|
65
|
+
get :edit, {:id => org_activity.to_param}, valid_session
|
66
|
+
expect(assigns(:org_activity)).to eq(org_activity)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "POST #create" do
|
71
|
+
context "with valid params" do
|
72
|
+
it "creates a new OrgActivity" do
|
73
|
+
expect {
|
74
|
+
post :create, {:org_activity => valid_attributes}, valid_session
|
75
|
+
}.to change(OrgActivity, :count).by(1)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "assigns a newly created org_activity as @org_activity" do
|
79
|
+
post :create, {:org_activity => valid_attributes}, valid_session
|
80
|
+
expect(assigns(:org_activity)).to be_a(OrgActivity)
|
81
|
+
expect(assigns(:org_activity)).to be_persisted
|
82
|
+
end
|
83
|
+
|
84
|
+
it "redirects to the created org_activity" do
|
85
|
+
post :create, {:org_activity => valid_attributes}, valid_session
|
86
|
+
expect(response).to redirect_to(OrgActivity.last)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context "with invalid params" do
|
91
|
+
it "assigns a newly created but unsaved org_activity as @org_activity" do
|
92
|
+
post :create, {:org_activity => invalid_attributes}, valid_session
|
93
|
+
expect(assigns(:org_activity)).to be_a_new(OrgActivity)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "re-renders the 'new' template" do
|
97
|
+
post :create, {:org_activity => invalid_attributes}, valid_session
|
98
|
+
expect(response).to render_template("new")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "PUT #update" do
|
104
|
+
context "with valid params" do
|
105
|
+
let(:new_attributes) {
|
106
|
+
skip("Add a hash of attributes valid for your model")
|
107
|
+
}
|
108
|
+
|
109
|
+
it "updates the requested org_activity" do
|
110
|
+
org_activity = OrgActivity.create! valid_attributes
|
111
|
+
put :update, {:id => org_activity.to_param, :org_activity => new_attributes}, valid_session
|
112
|
+
org_activity.reload
|
113
|
+
skip("Add assertions for updated state")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "assigns the requested org_activity as @org_activity" do
|
117
|
+
org_activity = OrgActivity.create! valid_attributes
|
118
|
+
put :update, {:id => org_activity.to_param, :org_activity => valid_attributes}, valid_session
|
119
|
+
expect(assigns(:org_activity)).to eq(org_activity)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "redirects to the org_activity" do
|
123
|
+
org_activity = OrgActivity.create! valid_attributes
|
124
|
+
put :update, {:id => org_activity.to_param, :org_activity => valid_attributes}, valid_session
|
125
|
+
expect(response).to redirect_to(org_activity)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
context "with invalid params" do
|
130
|
+
it "assigns the org_activity as @org_activity" do
|
131
|
+
org_activity = OrgActivity.create! valid_attributes
|
132
|
+
put :update, {:id => org_activity.to_param, :org_activity => invalid_attributes}, valid_session
|
133
|
+
expect(assigns(:org_activity)).to eq(org_activity)
|
134
|
+
end
|
135
|
+
|
136
|
+
it "re-renders the 'edit' template" do
|
137
|
+
org_activity = OrgActivity.create! valid_attributes
|
138
|
+
put :update, {:id => org_activity.to_param, :org_activity => invalid_attributes}, valid_session
|
139
|
+
expect(response).to render_template("edit")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe "DELETE #destroy" do
|
145
|
+
it "destroys the requested org_activity" do
|
146
|
+
org_activity = OrgActivity.create! valid_attributes
|
147
|
+
expect {
|
148
|
+
delete :destroy, {:id => org_activity.to_param}, valid_session
|
149
|
+
}.to change(OrgActivity, :count).by(-1)
|
150
|
+
end
|
151
|
+
|
152
|
+
it "redirects to the org_activities list" do
|
153
|
+
org_activity = OrgActivity.create! valid_attributes
|
154
|
+
delete :destroy, {:id => org_activity.to_param}, valid_session
|
155
|
+
expect(response).to redirect_to(org_activities_url)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
@@ -0,0 +1,159 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
+
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
+
# was generated by Rails when you ran the scaffold generator.
|
6
|
+
#
|
7
|
+
# It assumes that the implementation code is generated by the rails scaffold
|
8
|
+
# generator. If you are using any extension libraries to generate different
|
9
|
+
# controller code, this generated spec may or may not pass.
|
10
|
+
#
|
11
|
+
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
12
|
+
# of tools you can use to make these specs even more expressive, but we're
|
13
|
+
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
14
|
+
#
|
15
|
+
# Compared to earlier versions of this generator, there is very limited use of
|
16
|
+
# stubs and message expectations in this spec. Stubs are only used when there
|
17
|
+
# is no simpler way to get a handle on the object needed for the example.
|
18
|
+
# Message expectations are only used when there is no simpler way to specify
|
19
|
+
# that an instance is receiving a specific message.
|
20
|
+
|
21
|
+
RSpec.describe OrgBranchesController, type: :controller do
|
22
|
+
|
23
|
+
# This should return the minimal set of attributes required to create a valid
|
24
|
+
# OrgBranch. As you add validations to OrgBranch, be sure to
|
25
|
+
# adjust the attributes here as well.
|
26
|
+
let(:valid_attributes) {
|
27
|
+
skip("Add a hash of attributes valid for your model")
|
28
|
+
}
|
29
|
+
|
30
|
+
let(:invalid_attributes) {
|
31
|
+
skip("Add a hash of attributes invalid for your model")
|
32
|
+
}
|
33
|
+
|
34
|
+
# This should return the minimal set of values that should be in the session
|
35
|
+
# in order to pass any filters (e.g. authentication) defined in
|
36
|
+
# OrgBranchesController. Be sure to keep this updated too.
|
37
|
+
let(:valid_session) { {} }
|
38
|
+
|
39
|
+
describe "GET #index" do
|
40
|
+
it "assigns all org_branches as @org_branches" do
|
41
|
+
org_branch = OrgBranch.create! valid_attributes
|
42
|
+
get :index, {}, valid_session
|
43
|
+
expect(assigns(:org_branches)).to eq([org_branch])
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "GET #show" do
|
48
|
+
it "assigns the requested org_branch as @org_branch" do
|
49
|
+
org_branch = OrgBranch.create! valid_attributes
|
50
|
+
get :show, {:id => org_branch.to_param}, valid_session
|
51
|
+
expect(assigns(:org_branch)).to eq(org_branch)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "GET #new" do
|
56
|
+
it "assigns a new org_branch as @org_branch" do
|
57
|
+
get :new, {}, valid_session
|
58
|
+
expect(assigns(:org_branch)).to be_a_new(OrgBranch)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "GET #edit" do
|
63
|
+
it "assigns the requested org_branch as @org_branch" do
|
64
|
+
org_branch = OrgBranch.create! valid_attributes
|
65
|
+
get :edit, {:id => org_branch.to_param}, valid_session
|
66
|
+
expect(assigns(:org_branch)).to eq(org_branch)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "POST #create" do
|
71
|
+
context "with valid params" do
|
72
|
+
it "creates a new OrgBranch" do
|
73
|
+
expect {
|
74
|
+
post :create, {:org_branch => valid_attributes}, valid_session
|
75
|
+
}.to change(OrgBranch, :count).by(1)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "assigns a newly created org_branch as @org_branch" do
|
79
|
+
post :create, {:org_branch => valid_attributes}, valid_session
|
80
|
+
expect(assigns(:org_branch)).to be_a(OrgBranch)
|
81
|
+
expect(assigns(:org_branch)).to be_persisted
|
82
|
+
end
|
83
|
+
|
84
|
+
it "redirects to the created org_branch" do
|
85
|
+
post :create, {:org_branch => valid_attributes}, valid_session
|
86
|
+
expect(response).to redirect_to(OrgBranch.last)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context "with invalid params" do
|
91
|
+
it "assigns a newly created but unsaved org_branch as @org_branch" do
|
92
|
+
post :create, {:org_branch => invalid_attributes}, valid_session
|
93
|
+
expect(assigns(:org_branch)).to be_a_new(OrgBranch)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "re-renders the 'new' template" do
|
97
|
+
post :create, {:org_branch => invalid_attributes}, valid_session
|
98
|
+
expect(response).to render_template("new")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "PUT #update" do
|
104
|
+
context "with valid params" do
|
105
|
+
let(:new_attributes) {
|
106
|
+
skip("Add a hash of attributes valid for your model")
|
107
|
+
}
|
108
|
+
|
109
|
+
it "updates the requested org_branch" do
|
110
|
+
org_branch = OrgBranch.create! valid_attributes
|
111
|
+
put :update, {:id => org_branch.to_param, :org_branch => new_attributes}, valid_session
|
112
|
+
org_branch.reload
|
113
|
+
skip("Add assertions for updated state")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "assigns the requested org_branch as @org_branch" do
|
117
|
+
org_branch = OrgBranch.create! valid_attributes
|
118
|
+
put :update, {:id => org_branch.to_param, :org_branch => valid_attributes}, valid_session
|
119
|
+
expect(assigns(:org_branch)).to eq(org_branch)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "redirects to the org_branch" do
|
123
|
+
org_branch = OrgBranch.create! valid_attributes
|
124
|
+
put :update, {:id => org_branch.to_param, :org_branch => valid_attributes}, valid_session
|
125
|
+
expect(response).to redirect_to(org_branch)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
context "with invalid params" do
|
130
|
+
it "assigns the org_branch as @org_branch" do
|
131
|
+
org_branch = OrgBranch.create! valid_attributes
|
132
|
+
put :update, {:id => org_branch.to_param, :org_branch => invalid_attributes}, valid_session
|
133
|
+
expect(assigns(:org_branch)).to eq(org_branch)
|
134
|
+
end
|
135
|
+
|
136
|
+
it "re-renders the 'edit' template" do
|
137
|
+
org_branch = OrgBranch.create! valid_attributes
|
138
|
+
put :update, {:id => org_branch.to_param, :org_branch => invalid_attributes}, valid_session
|
139
|
+
expect(response).to render_template("edit")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe "DELETE #destroy" do
|
145
|
+
it "destroys the requested org_branch" do
|
146
|
+
org_branch = OrgBranch.create! valid_attributes
|
147
|
+
expect {
|
148
|
+
delete :destroy, {:id => org_branch.to_param}, valid_session
|
149
|
+
}.to change(OrgBranch, :count).by(-1)
|
150
|
+
end
|
151
|
+
|
152
|
+
it "redirects to the org_branches list" do
|
153
|
+
org_branch = OrgBranch.create! valid_attributes
|
154
|
+
delete :destroy, {:id => org_branch.to_param}, valid_session
|
155
|
+
expect(response).to redirect_to(org_branches_url)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|
@@ -0,0 +1,159 @@
|
|
1
|
+
require 'rails_helper'
|
2
|
+
|
3
|
+
# This spec was generated by rspec-rails when you ran the scaffold generator.
|
4
|
+
# It demonstrates how one might use RSpec to specify the controller code that
|
5
|
+
# was generated by Rails when you ran the scaffold generator.
|
6
|
+
#
|
7
|
+
# It assumes that the implementation code is generated by the rails scaffold
|
8
|
+
# generator. If you are using any extension libraries to generate different
|
9
|
+
# controller code, this generated spec may or may not pass.
|
10
|
+
#
|
11
|
+
# It only uses APIs available in rails and/or rspec-rails. There are a number
|
12
|
+
# of tools you can use to make these specs even more expressive, but we're
|
13
|
+
# sticking to rails and rspec-rails APIs to keep things simple and stable.
|
14
|
+
#
|
15
|
+
# Compared to earlier versions of this generator, there is very limited use of
|
16
|
+
# stubs and message expectations in this spec. Stubs are only used when there
|
17
|
+
# is no simpler way to get a handle on the object needed for the example.
|
18
|
+
# Message expectations are only used when there is no simpler way to specify
|
19
|
+
# that an instance is receiving a specific message.
|
20
|
+
|
21
|
+
RSpec.describe OrgDirectorTypesController, type: :controller do
|
22
|
+
|
23
|
+
# This should return the minimal set of attributes required to create a valid
|
24
|
+
# OrgDirectorType. As you add validations to OrgDirectorType, be sure to
|
25
|
+
# adjust the attributes here as well.
|
26
|
+
let(:valid_attributes) {
|
27
|
+
skip("Add a hash of attributes valid for your model")
|
28
|
+
}
|
29
|
+
|
30
|
+
let(:invalid_attributes) {
|
31
|
+
skip("Add a hash of attributes invalid for your model")
|
32
|
+
}
|
33
|
+
|
34
|
+
# This should return the minimal set of values that should be in the session
|
35
|
+
# in order to pass any filters (e.g. authentication) defined in
|
36
|
+
# OrgDirectorTypesController. Be sure to keep this updated too.
|
37
|
+
let(:valid_session) { {} }
|
38
|
+
|
39
|
+
describe "GET #index" do
|
40
|
+
it "assigns all org_director_types as @org_director_types" do
|
41
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
42
|
+
get :index, {}, valid_session
|
43
|
+
expect(assigns(:org_director_types)).to eq([org_director_type])
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe "GET #show" do
|
48
|
+
it "assigns the requested org_director_type as @org_director_type" do
|
49
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
50
|
+
get :show, {:id => org_director_type.to_param}, valid_session
|
51
|
+
expect(assigns(:org_director_type)).to eq(org_director_type)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
describe "GET #new" do
|
56
|
+
it "assigns a new org_director_type as @org_director_type" do
|
57
|
+
get :new, {}, valid_session
|
58
|
+
expect(assigns(:org_director_type)).to be_a_new(OrgDirectorType)
|
59
|
+
end
|
60
|
+
end
|
61
|
+
|
62
|
+
describe "GET #edit" do
|
63
|
+
it "assigns the requested org_director_type as @org_director_type" do
|
64
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
65
|
+
get :edit, {:id => org_director_type.to_param}, valid_session
|
66
|
+
expect(assigns(:org_director_type)).to eq(org_director_type)
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
describe "POST #create" do
|
71
|
+
context "with valid params" do
|
72
|
+
it "creates a new OrgDirectorType" do
|
73
|
+
expect {
|
74
|
+
post :create, {:org_director_type => valid_attributes}, valid_session
|
75
|
+
}.to change(OrgDirectorType, :count).by(1)
|
76
|
+
end
|
77
|
+
|
78
|
+
it "assigns a newly created org_director_type as @org_director_type" do
|
79
|
+
post :create, {:org_director_type => valid_attributes}, valid_session
|
80
|
+
expect(assigns(:org_director_type)).to be_a(OrgDirectorType)
|
81
|
+
expect(assigns(:org_director_type)).to be_persisted
|
82
|
+
end
|
83
|
+
|
84
|
+
it "redirects to the created org_director_type" do
|
85
|
+
post :create, {:org_director_type => valid_attributes}, valid_session
|
86
|
+
expect(response).to redirect_to(OrgDirectorType.last)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
|
90
|
+
context "with invalid params" do
|
91
|
+
it "assigns a newly created but unsaved org_director_type as @org_director_type" do
|
92
|
+
post :create, {:org_director_type => invalid_attributes}, valid_session
|
93
|
+
expect(assigns(:org_director_type)).to be_a_new(OrgDirectorType)
|
94
|
+
end
|
95
|
+
|
96
|
+
it "re-renders the 'new' template" do
|
97
|
+
post :create, {:org_director_type => invalid_attributes}, valid_session
|
98
|
+
expect(response).to render_template("new")
|
99
|
+
end
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe "PUT #update" do
|
104
|
+
context "with valid params" do
|
105
|
+
let(:new_attributes) {
|
106
|
+
skip("Add a hash of attributes valid for your model")
|
107
|
+
}
|
108
|
+
|
109
|
+
it "updates the requested org_director_type" do
|
110
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
111
|
+
put :update, {:id => org_director_type.to_param, :org_director_type => new_attributes}, valid_session
|
112
|
+
org_director_type.reload
|
113
|
+
skip("Add assertions for updated state")
|
114
|
+
end
|
115
|
+
|
116
|
+
it "assigns the requested org_director_type as @org_director_type" do
|
117
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
118
|
+
put :update, {:id => org_director_type.to_param, :org_director_type => valid_attributes}, valid_session
|
119
|
+
expect(assigns(:org_director_type)).to eq(org_director_type)
|
120
|
+
end
|
121
|
+
|
122
|
+
it "redirects to the org_director_type" do
|
123
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
124
|
+
put :update, {:id => org_director_type.to_param, :org_director_type => valid_attributes}, valid_session
|
125
|
+
expect(response).to redirect_to(org_director_type)
|
126
|
+
end
|
127
|
+
end
|
128
|
+
|
129
|
+
context "with invalid params" do
|
130
|
+
it "assigns the org_director_type as @org_director_type" do
|
131
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
132
|
+
put :update, {:id => org_director_type.to_param, :org_director_type => invalid_attributes}, valid_session
|
133
|
+
expect(assigns(:org_director_type)).to eq(org_director_type)
|
134
|
+
end
|
135
|
+
|
136
|
+
it "re-renders the 'edit' template" do
|
137
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
138
|
+
put :update, {:id => org_director_type.to_param, :org_director_type => invalid_attributes}, valid_session
|
139
|
+
expect(response).to render_template("edit")
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
144
|
+
describe "DELETE #destroy" do
|
145
|
+
it "destroys the requested org_director_type" do
|
146
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
147
|
+
expect {
|
148
|
+
delete :destroy, {:id => org_director_type.to_param}, valid_session
|
149
|
+
}.to change(OrgDirectorType, :count).by(-1)
|
150
|
+
end
|
151
|
+
|
152
|
+
it "redirects to the org_director_types list" do
|
153
|
+
org_director_type = OrgDirectorType.create! valid_attributes
|
154
|
+
delete :destroy, {:id => org_director_type.to_param}, valid_session
|
155
|
+
expect(response).to redirect_to(org_director_types_url)
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
end
|