Skip to content

Commit

Permalink
Actualiza a sivel2 que reubica campo hijos. Closes #271
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Apr 10, 2024
1 parent 9183588 commit 23b0997
Show file tree
Hide file tree
Showing 6 changed files with 29 additions and 18 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: 52add38b9bc1a18311387aa11ef671ae40927b44
revision: 707b66b873109230cb5b8ac51b85424fa9befe37
branch: v2.2
specs:
msip (2.2.0.beta5)
Expand All @@ -94,7 +94,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/sivel2_gen.git
revision: 027c2472145c114a9d2d869b419f005daeca55e7
revision: 8a5cae6a65470725cd6021f2dd0491e443a495a4
branch: v2.2
specs:
sivel2_gen (2.2.0.beta4)
Expand Down Expand Up @@ -237,7 +237,7 @@ GEM
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
devise (4.9.3)
devise (4.9.4)
bcrypt (~> 3.0)
orm_adapter (~> 0.1)
railties (>= 4.1.0)
Expand Down
7 changes: 7 additions & 0 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ SET xmloption = content;
SET client_min_messages = warning;
SET row_security = off;

--
-- Name: public; Type: SCHEMA; Schema: -; Owner: -
--

-- *not* creating schema, since initdb creates it


--
-- Name: es_co_utf_8; Type: COLLATION; Schema: public; Owner: -
--
Expand Down
4 changes: 4 additions & 0 deletions test/controllers/msip/homonimos_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ def dedup_ruta(ruta)
)

assert_predicate persona1, :valid?

persona2 = Msip::Persona.create(
id: 2,
nombres: "nombre2",
Expand All @@ -203,10 +204,12 @@ def dedup_ruta(ruta)
id: nil
}})
end
debugger

assert_redirected_to dedup_ruta(homonimo_path(
assigns(:homonimo)
))
debugger
idr = response.body.gsub(%r{.*homonimos/}, "").gsub(/">.*/, "").to_i

homonimo = Msip::Homonimo.all.take
Expand All @@ -226,6 +229,7 @@ def dedup_ruta(ruta)
assert_template :edit

sign_in @current_usuario
debugger
assert_difference("Homonimo.count", -1) do
delete dedup_ruta(homonimo_path(Homonimo.find(idr)))
end
Expand Down
15 changes: 3 additions & 12 deletions test/controllers/regionespago_controller_test.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,11 @@
require 'test_helper'
require_relative '../test_helper'

# Esta prueba supone que en la tabla básica hay un registro con id 1
# Si no lo hay agregar skip a pruebas que lo suponen o crear registro
# con id 1 en las mismas o en setup

module Admin
class RegionespagoControllerTest < ActionDispatch::IntegrationTest
REGIONPAGO_NUEVA = {
nombre: 'X',
observaciones: 'y',
fechacreacion: '2023-08-27',
fechadeshabilitacion: nil,
created_at: '2023-08-27',
updated_at: '2023-08-27',
}

IDEX = 10

include Rails.application.routes.url_helpers
Expand Down Expand Up @@ -51,7 +42,7 @@ class RegionespagoControllerTest < ActionDispatch::IntegrationTest
test "debe crear nueva" do
assert_difference('Regionpago.count') do
post admin_regionespago_path, params: {
regionpago: REGIONPAGO_NUEVA
regionpago: PRUEBA_REGIONPAGO
}
end

Expand All @@ -68,7 +59,7 @@ class RegionespagoControllerTest < ActionDispatch::IntegrationTest
end

test "debe eliminar" do
r = Regionpago.create!(REGIONPAGO_NUEVO)
r = Regionpago.create!(PRUEBA_REGIONPAGO)
assert_difference('Regionpago.count', -1) do
delete admin_regionpago_url(Regionpago.find(r.id))
end
Expand Down
9 changes: 9 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,15 @@ def load_seeds
tdocumento_id: 11
}

PRUEBA_REGIONPAGO = {
nombre: 'X',
observaciones: 'y',
fechacreacion: '2023-08-27',
fechadeshabilitacion: nil,
created_at: '2023-08-27',
updated_at: '2023-08-27',
}

PRUEBA_TIPOORG = {
nombre: "Tipoorg",
fechacreacion: "2021-10-10",
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1239,9 +1239,9 @@ camelcase@^6.2.0:
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==

caniuse-lite@^1.0.30001587:
version "1.0.30001607"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001607.tgz#b91e8e033f6bca4e13d3d45388d87fa88931d9a5"
integrity sha512-WcvhVRjXLKFB/kmOFVwELtMxyhq3iM/MvmXcyCe2PNf166c39mptscOc/45TTS96n2gpNV2z7+NakArTWZCQ3w==
version "1.0.30001608"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001608.tgz#7ae6e92ffb300e4b4ec2f795e0abab456ec06cc0"
integrity sha512-cjUJTQkk9fQlJR2s4HMuPMvTiRggl0rAVMtthQuyOlDWuqHXqN8azLq+pi8B2TjwKJ32diHjUqRIKeFX4z1FoA==

chalk@^2.4.2:
version "2.4.2"
Expand Down

0 comments on commit 23b0997

Please sign in to comment.