dorsale 3.8.1 → 3.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +5 -1
- data/app/commands/dorsale/flyboy/task_commands.rb +1 -1
- data/app/controllers/concerns/dorsale/flyboy/tasks_summary_concern.rb +0 -1
- data/app/controllers/dorsale/alexandrie/attachments_controller.rb +1 -2
- data/app/controllers/dorsale/application_controller.rb +0 -1
- data/app/controllers/dorsale/billing_machine/application_controller.rb +0 -2
- data/app/controllers/dorsale/billing_machine/invoices_controller.rb +9 -22
- data/app/controllers/dorsale/billing_machine/payment_terms_controller.rb +0 -1
- data/app/controllers/dorsale/billing_machine/quotations_controller.rb +1 -4
- data/app/controllers/dorsale/comments_controller.rb +3 -2
- data/app/controllers/dorsale/customer_vault/activity_types_controller.rb +0 -1
- data/app/controllers/dorsale/customer_vault/application_controller.rb +0 -1
- data/app/controllers/dorsale/customer_vault/links_controller.rb +22 -12
- data/app/controllers/dorsale/customer_vault/origins_controller.rb +0 -1
- data/app/controllers/dorsale/customer_vault/people_controller.rb +2 -3
- data/app/controllers/dorsale/expense_gun/categories_controller.rb +0 -1
- data/app/controllers/dorsale/expense_gun/expenses_controller.rb +0 -1
- data/app/controllers/dorsale/flyboy/task_comments_controller.rb +0 -1
- data/app/controllers/dorsale/flyboy/tasks_controller.rb +28 -21
- data/app/controllers/dorsale/users_controller.rb +0 -1
- data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_payment_status.rb +9 -5
- data/app/filters/dorsale/billing_machine/small_data/filter_strategy_by_state.rb +2 -2
- data/app/filters/dorsale/flyboy/small_data/filter_for_tasks.rb +1 -1
- data/app/helpers/dorsale/billing_machine/application_helper.rb +6 -6
- data/app/helpers/dorsale/context_helper.rb +1 -1
- data/app/helpers/dorsale/flyboy/application_helper.rb +4 -5
- data/app/mailers/dorsale/billing_machine/invoice_mailer.rb +0 -1
- data/app/mailers/dorsale/flyboy/task_mailer.rb +0 -1
- data/app/mailers/dorsale/user_mailer.rb +0 -1
- data/app/models/dorsale/address.rb +2 -2
- data/app/models/dorsale/alexandrie/attachment_type.rb +0 -1
- data/app/models/dorsale/billing_machine.rb +1 -2
- data/app/models/dorsale/billing_machine/invoice.rb +19 -30
- data/app/models/dorsale/billing_machine/invoice_line.rb +2 -2
- data/app/models/dorsale/billing_machine/quotation.rb +11 -17
- data/app/models/dorsale/billing_machine/quotation_line.rb +2 -3
- data/app/models/dorsale/comment.rb +1 -1
- data/app/models/dorsale/customer_vault/corporation.rb +11 -10
- data/app/models/dorsale/customer_vault/event.rb +2 -2
- data/app/models/dorsale/customer_vault/individual.rb +4 -2
- data/app/models/dorsale/customer_vault/person.rb +14 -4
- data/app/models/dorsale/customer_vault/person_data.rb +1 -2
- data/app/models/dorsale/expense_gun/expense.rb +2 -5
- data/app/models/dorsale/expense_gun/expense_line.rb +2 -2
- data/app/models/dorsale/flyboy/task.rb +17 -18
- data/app/models/dorsale/flyboy/task_comment.rb +1 -1
- data/app/models/dorsale/users/active.rb +1 -1
- data/app/models/dorsale/users/avatar.rb +2 -1
- data/app/models/dorsale/users/password_generation.rb +0 -1
- data/app/pdfs/concerns/dorsale/alexandrie/prawn/render_with_attachments.rb +1 -1
- data/app/pdfs/dorsale/application_pdf.rb +7 -0
- data/app/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf.rb +52 -47
- data/app/pdfs/dorsale/billing_machine/invoice_single_vat_pdf.rb +94 -205
- data/app/pdfs/dorsale/prawn_helpers.rb +107 -0
- data/app/policies/dorsale/application_policy.rb +2 -4
- data/app/policies/dorsale/expense_gun/expense_policy_helper.rb +0 -1
- data/app/policies/dorsale/flyboy/task_policy_helper.rb +3 -3
- data/app/policies/dorsale/policy_checker.rb +11 -18
- data/app/services/dorsale/billing_machine/invoice/copy.rb +2 -2
- data/app/services/dorsale/billing_machine/pdf_file_generator.rb +7 -2
- data/app/services/dorsale/billing_machine/quotation/copy.rb +1 -1
- data/app/services/dorsale/billing_machine/quotation/to_invoice.rb +10 -7
- data/app/services/dorsale/flyboy/task/snoozer.rb +1 -1
- data/app/views/dorsale/billing_machine/invoices/_details.html.slim +1 -2
- data/app/views/dorsale/billing_machine/invoices/_form.html.slim +4 -11
- data/app/views/dorsale/billing_machine/invoices/index.xlsx.ruby +1 -1
- data/app/views/dorsale/flyboy/tasks/index.xlsx.ruby +1 -1
- data/config/locales/alexandrie.en.yml +0 -4
- data/config/locales/alexandrie.fr.yml +0 -4
- data/config/locales/billing_machine.en.yml +0 -41
- data/config/locales/billing_machine.fr.yml +0 -41
- data/config/routes.rb +0 -1
- data/db/migrate/20161119064536_delete_id_cards.rb +9 -0
- data/features/billing_machine_invoices.feature +0 -1
- data/features/billing_machine_multiple_vat.feature +0 -1
- data/features/billing_machine_quotations.feature +0 -1
- data/features/step_definitions/billing_machine_invoices_steps.rb +73 -79
- data/features/step_definitions/billing_machine_multiple_vat.rb +5 -6
- data/features/step_definitions/billing_machine_payment_terms_steps.rb +2 -2
- data/features/step_definitions/billing_machine_quotations_steps.rb +45 -80
- data/features/step_definitions/common_steps.rb +0 -4
- data/features/step_definitions/customer_vault_activity_types_steps.rb +1 -1
- data/features/step_definitions/customer_vault_corporations_steps.rb +27 -23
- data/features/step_definitions/customer_vault_individuals_steps.rb +8 -9
- data/features/step_definitions/customer_vault_invoices_steps.rb +1 -1
- data/features/step_definitions/customer_vault_links_steps.rb +6 -6
- data/features/step_definitions/customer_vault_origins_steps.rb +1 -1
- data/features/step_definitions/customer_vault_people_steps.rb +2 -1
- data/features/step_definitions/expense_gun_categories_steps.rb +2 -2
- data/features/step_definitions/expense_gun_expenses_steps.rb +6 -6
- data/features/step_definitions/flyboy_tasks_steps.rb +4 -7
- data/features/step_definitions/tasks_summary_steps.rb +3 -3
- data/features/support/env.rb +3 -2
- data/lib/dorsale/engine.rb +8 -8
- data/lib/dorsale/file_loader.rb +1 -1
- data/lib/dorsale/simple_form.rb +3 -3
- data/lib/dorsale/simple_form_bootstrap.rb +46 -46
- data/lib/dorsale/version.rb +1 -1
- data/spec/controllers/dorsale/alexandrie/attachments_controller_spec.rb +3 -3
- data/spec/controllers/dorsale/billing_machine/invoices_controller_spec.rb +0 -1
- data/spec/controllers/dorsale/comments_controller_spec.rb +1 -1
- data/spec/controllers/dorsale/customer_vault/events_controller_spec.rb +9 -9
- data/spec/controllers/dorsale/customer_vault/people_controller_spec.rb +15 -19
- data/spec/controllers/dorsale/flyboy/task_comments_controller_spec.rb +1 -2
- data/spec/controllers/dorsale/flyboy/tasks_controller_spec.rb +43 -19
- data/spec/factories/alexandrie_attachment_types.rb +1 -1
- data/spec/factories/alexandrie_attachments.rb +1 -1
- data/spec/factories/billing_machine_invoice_lines.rb +1 -1
- data/spec/factories/billing_machine_invoices.rb +1 -2
- data/spec/factories/billing_machine_payment_terms.rb +1 -1
- data/spec/factories/billing_machine_quotation_lines.rb +1 -2
- data/spec/factories/billing_machine_quotations.rb +1 -2
- data/spec/factories/customer_vault_activity_types.rb +1 -1
- data/spec/factories/customer_vault_corporations.rb +1 -1
- data/spec/factories/customer_vault_event.rb +1 -1
- data/spec/factories/customer_vault_individuals.rb +2 -2
- data/spec/factories/customer_vault_links.rb +1 -1
- data/spec/factories/customer_vault_origins.rb +1 -1
- data/spec/factories/dorsale_addresses.rb +1 -1
- data/spec/factories/dorsale_comments.rb +1 -1
- data/spec/factories/expense_gun_categories.rb +2 -2
- data/spec/factories/expense_gun_expense_lines.rb +8 -8
- data/spec/factories/expense_gun_expenses.rb +2 -3
- data/spec/factories/flyboy_task_comments.rb +1 -1
- data/spec/factories/flyboy_tasks.rb +1 -1
- data/spec/mailers/user_mailer.rb +5 -6
- data/spec/models/dorsale/address_spec.rb +26 -26
- data/spec/models/dorsale/billing_machine/invoice_line_spec.rb +6 -6
- data/spec/models/dorsale/billing_machine/invoice_spec.rb +37 -23
- data/spec/models/dorsale/billing_machine/quotation_line_spec.rb +9 -10
- data/spec/models/dorsale/billing_machine/quotation_spec.rb +26 -28
- data/spec/models/dorsale/billing_machine_spec.rb +0 -1
- data/spec/models/dorsale/comment_spec.rb +0 -1
- data/spec/models/dorsale/customer_vault/corporation_spec.rb +20 -20
- data/spec/models/dorsale/customer_vault/event_spec.rb +1 -1
- data/spec/models/dorsale/customer_vault/individual_spec.rb +0 -2
- data/spec/models/dorsale/customer_vault/link_spec.rb +0 -1
- data/spec/models/dorsale/customer_vault/person_spec.rb +7 -6
- data/spec/models/dorsale/expense_gun/category_spec.rb +2 -2
- data/spec/models/dorsale/expense_gun/expense_line_spec.rb +14 -14
- data/spec/models/dorsale/expense_gun/expense_spec.rb +23 -13
- data/spec/models/dorsale/flyboy/task_comment_spec.rb +5 -6
- data/spec/models/dorsale/flyboy/task_spec.rb +66 -42
- data/spec/models/dorsale/users_spec.rb +3 -5
- data/spec/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf_spec.rb +6 -11
- data/spec/pdfs/dorsale/billing_machine/invoice_single_vat_pdf_spec.rb +7 -11
- data/spec/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf_spec.rb +6 -11
- data/spec/pdfs/dorsale/billing_machine/quotation_single_vat_pdf_spec.rb +7 -14
- data/spec/rails_helper.rb +1 -1
- data/spec/routing/dorsale/billing_machine/invoices_routing_spec.rb +0 -1
- data/spec/routing/dorsale/billing_machine/quotations_routing_spec.rb +0 -1
- data/spec/routing/dorsale/comments_routing_spec.rb +0 -2
- data/spec/routing/dorsale/customer_vault/people_routing_spec.rb +0 -1
- data/spec/routing/dorsale/expense_gun/expenses_routing_spec.rb +0 -1
- data/spec/routing/dorsale/flyboy/task_comments_routing_spec.rb +0 -1
- data/spec/routing/dorsale/users_routing_spec.rb +1 -1
- data/spec/services/dorsale/billing_machine/quotation/copy_spec.rb +2 -2
- data/spec/services/dorsale/expense_gun/expense/copy_spec.rb +13 -17
- data/spec/services/dorsale/flyboy/task/copy_spec.rb +1 -2
- data/spec/services/dorsale/flyboy/task/snoozer_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -0
- metadata +5 -43
- data/app/controllers/dorsale/billing_machine/id_cards_controller.rb +0 -106
- data/app/models/dorsale/billing_machine/id_card.rb +0 -14
- data/app/policies/dorsale/billing_machine/id_card_policy_helper.rb +0 -7
- data/app/views/dorsale/billing_machine/id_cards/_form.html.slim +0 -42
- data/app/views/dorsale/billing_machine/id_cards/_index_actions.html.slim +0 -2
- data/app/views/dorsale/billing_machine/id_cards/_list.html.slim +0 -27
- data/app/views/dorsale/billing_machine/id_cards/edit.html.slim +0 -1
- data/app/views/dorsale/billing_machine/id_cards/index.html.slim +0 -11
- data/app/views/dorsale/billing_machine/id_cards/new.html.slim +0 -1
- data/features/billing_machine_id_cards.feature +0 -19
- data/features/step_definitions/billing_machine_id_cards_steps.rb +0 -53
- data/features/support/ajax.rb +0 -20
- data/features/support/database_cleaner.rb +0 -12
- data/features/support/factory_girl.rb +0 -1
- data/features/support/fix_referrer.rb +0 -9
- data/features/support/message_delivery.rb +0 -1
- data/features/support/poltergeist.rb +0 -22
- data/features/support/rails.rb +0 -1
- data/features/support/rspec.rb +0 -6
- data/features/support/screenshots.rb +0 -5
- data/features/support/sign_in.rb +0 -17
- data/features/support/simplecov.rb +0 -1
- data/features/support/turbolinks.rb +0 -30
- data/spec/factories/billing_machine_id_cards.rb +0 -26
- data/spec/models/dorsale/billing_machine/id_card_spec.rb +0 -12
@@ -1,7 +1,6 @@
|
|
1
1
|
require "rails_helper"
|
2
2
|
|
3
3
|
RSpec.describe User, type: :model do
|
4
|
-
|
5
4
|
it "should have a valid factores" do
|
6
5
|
expect(create(:user)).to be_valid
|
7
6
|
end
|
@@ -14,17 +13,17 @@ RSpec.describe User, type: :model do
|
|
14
13
|
expect(@user.is_active).to eq true
|
15
14
|
end
|
16
15
|
|
17
|
-
it
|
16
|
+
it "should create a valid password upon creation" do
|
18
17
|
user = create(:user, password: nil, password_confirmation: nil)
|
19
18
|
expect(user).to be_persisted
|
20
19
|
end
|
21
20
|
|
22
|
-
it
|
21
|
+
it "should not override choosen password" do
|
23
22
|
user = create(:user, password: "totototo", password_confirmation: nil)
|
24
23
|
expect(user.password).to eq "totototo"
|
25
24
|
end
|
26
25
|
|
27
|
-
it
|
26
|
+
it "should send a welcome message upon creation" do
|
28
27
|
expect {
|
29
28
|
create(:user)
|
30
29
|
}.to change(ActionMailer::Base.deliveries, :count).by(1)
|
@@ -63,5 +62,4 @@ RSpec.describe User, type: :model do
|
|
63
62
|
expect(@user.avatar_url).to be_present
|
64
63
|
end
|
65
64
|
end
|
66
|
-
|
67
65
|
end
|
@@ -32,16 +32,11 @@ describe ::Dorsale::BillingMachine::InvoiceMultipleVatPdf, pdfs: true do
|
|
32
32
|
expect(content).to include "TVA %"
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
id_card = Dorsale::BillingMachine::IdCard.new
|
38
|
-
id_card.save(validate: false)
|
39
|
-
invoice = ::Dorsale::BillingMachine::Invoice.create!(id_card: id_card)
|
40
|
-
}
|
41
|
-
|
42
|
-
it "should work" do
|
43
|
-
expect { generate! }.to_not raise_error
|
44
|
-
end
|
45
|
-
end # describe "empty invoice"
|
35
|
+
it "should work with empty invoice" do
|
36
|
+
invoice = ::Dorsale::BillingMachine::Invoice.new
|
46
37
|
|
38
|
+
expect {
|
39
|
+
described_class.new(invoice).tap(&:build).render_with_attachments
|
40
|
+
}.to_not raise_error
|
41
|
+
end
|
47
42
|
end
|
@@ -32,15 +32,11 @@ describe ::Dorsale::BillingMachine::InvoiceSingleVatPdf, pdfs: true do
|
|
32
32
|
expect(content).to_not include "TVA %"
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
invoice
|
40
|
-
}
|
41
|
-
|
42
|
-
it "should work" do
|
43
|
-
expect { generate! }.to_not raise_error
|
44
|
-
end
|
45
|
-
end # describe "empty invoice"
|
35
|
+
it "should work with empty invoice" do
|
36
|
+
invoice = ::Dorsale::BillingMachine::Invoice.new
|
37
|
+
|
38
|
+
expect {
|
39
|
+
described_class.new(invoice).tap(&:build).render_with_attachments
|
40
|
+
}.to_not raise_error
|
41
|
+
end
|
46
42
|
end
|
@@ -32,16 +32,11 @@ describe ::Dorsale::BillingMachine::QuotationMultipleVatPdf, pdfs: true do
|
|
32
32
|
expect(content).to include "TVA %"
|
33
33
|
end
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
id_card = Dorsale::BillingMachine::IdCard.new
|
38
|
-
id_card.save(validate: false)
|
39
|
-
quotation = ::Dorsale::BillingMachine::Quotation.create!(id_card: id_card)
|
40
|
-
}
|
41
|
-
|
42
|
-
it "should work" do
|
43
|
-
expect { generate! }.to_not raise_error
|
44
|
-
end
|
45
|
-
end # describe "empty quotation"
|
35
|
+
it "should work with empty quotation" do
|
36
|
+
quotation = ::Dorsale::BillingMachine::Quotation.new
|
46
37
|
|
38
|
+
expect {
|
39
|
+
described_class.new(quotation).tap(&:build).render_with_attachments
|
40
|
+
}.to_not raise_error
|
41
|
+
end
|
47
42
|
end
|
@@ -25,23 +25,20 @@ describe ::Dorsale::BillingMachine::QuotationSingleVatPdf, pdfs: true do
|
|
25
25
|
generate!
|
26
26
|
Yomu.new(quotation.pdf_file.path).text
|
27
27
|
}
|
28
|
+
|
28
29
|
it "should display global vat rate" do
|
29
30
|
expect(content).to include "TVA 19,60 %"
|
30
31
|
expect(content).to_not include "MONTANT TVA"
|
31
32
|
expect(content).to_not include "TVA %"
|
32
33
|
end
|
33
34
|
|
34
|
-
|
35
|
-
|
36
|
-
id_card = Dorsale::BillingMachine::IdCard.new
|
37
|
-
id_card.save(validate: false)
|
38
|
-
quotation = ::Dorsale::BillingMachine::Quotation.create!(id_card: id_card)
|
39
|
-
}
|
35
|
+
it "should work with empty quotation" do
|
36
|
+
quotation = ::Dorsale::BillingMachine::Quotation.new
|
40
37
|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
end
|
38
|
+
expect {
|
39
|
+
described_class.new(quotation).tap(&:build).render_with_attachments
|
40
|
+
}.to_not raise_error
|
41
|
+
end
|
45
42
|
|
46
43
|
describe "attachments" do
|
47
44
|
let(:quotation) {
|
@@ -55,8 +52,4 @@ describe ::Dorsale::BillingMachine::QuotationSingleVatPdf, pdfs: true do
|
|
55
52
|
expect(content).to include "page 2"
|
56
53
|
end
|
57
54
|
end # describe "attachments"
|
58
|
-
|
59
55
|
end
|
60
|
-
|
61
|
-
|
62
|
-
|
data/spec/rails_helper.rb
CHANGED
@@ -52,7 +52,7 @@ RSpec.configure do |config|
|
|
52
52
|
# https://relishapp.com/rspec/rspec-rails/docs
|
53
53
|
config.infer_spec_type_from_file_location!
|
54
54
|
|
55
|
-
config.include
|
55
|
+
config.include FactoryBot::Syntax::Methods
|
56
56
|
|
57
57
|
config.after { Timecop.return }
|
58
58
|
end
|
@@ -4,7 +4,6 @@ RSpec.describe Dorsale::CommentsController, type: :routing do
|
|
4
4
|
routes { Dorsale::Engine.routes }
|
5
5
|
|
6
6
|
describe "routing" do
|
7
|
-
|
8
7
|
it "routes to #create" do
|
9
8
|
expect(post: "/comments").to route_to("dorsale/comments#create")
|
10
9
|
end
|
@@ -20,6 +19,5 @@ RSpec.describe Dorsale::CommentsController, type: :routing do
|
|
20
19
|
it "routes to #destroy" do
|
21
20
|
expect(delete: "/comments/3").to route_to("dorsale/comments#destroy", id: "3")
|
22
21
|
end
|
23
|
-
|
24
22
|
end
|
25
23
|
end
|
@@ -36,8 +36,8 @@ RSpec.describe Dorsale::BillingMachine::Quotation::Copy do
|
|
36
36
|
end
|
37
37
|
|
38
38
|
it "should reset date" do
|
39
|
-
expect(quotation.date).to_not eq
|
40
|
-
expect(copy.date).to eq
|
39
|
+
expect(quotation.date).to_not eq Date.current
|
40
|
+
expect(copy.date).to eq Date.current
|
41
41
|
end
|
42
42
|
|
43
43
|
it "should reset unique_index, tracking_id, created_at, updated_at" do
|
@@ -5,14 +5,14 @@ RSpec.describe ::Dorsale::ExpenseGun::Expense::Copy do
|
|
5
5
|
expense = Dorsale::ExpenseGun::Expense.create!(
|
6
6
|
:user => create(:user),
|
7
7
|
:name => "ExpenseName",
|
8
|
-
:date =>
|
8
|
+
:date => Date.current,
|
9
9
|
:state => "accepted",
|
10
10
|
)
|
11
11
|
|
12
12
|
line = create(:expense_gun_expense_line,
|
13
13
|
:expense => expense,
|
14
14
|
:name => "ExpenseLineName",
|
15
|
-
:date =>
|
15
|
+
:date => Date.current,
|
16
16
|
)
|
17
17
|
|
18
18
|
expense.reload
|
@@ -28,19 +28,17 @@ RSpec.describe ::Dorsale::ExpenseGun::Expense::Copy do
|
|
28
28
|
|
29
29
|
it "should duplicate expense lines attributes" do
|
30
30
|
expect(copy.expense_lines.length).to eq 1
|
31
|
-
|
32
|
-
|
33
|
-
expect(
|
34
|
-
expect(
|
35
|
-
|
36
|
-
expect(
|
37
|
-
expect(
|
38
|
-
|
39
|
-
expect(
|
40
|
-
expect(
|
41
|
-
|
42
|
-
expect(copy.expense_lines.first.company_part).to be_present
|
43
|
-
expect(copy.expense_lines.first.company_part).to eq expense.expense_lines.first.company_part
|
31
|
+
expense_line = copy.expense_lines.first
|
32
|
+
|
33
|
+
expect(expense_line.name).to eq "ExpenseLineName"
|
34
|
+
expect(expense_line.category).to be_present
|
35
|
+
expect(expense_line.category).to eq expense.expense_lines.first.category
|
36
|
+
expect(expense_line.total_all_taxes).to be_present
|
37
|
+
expect(expense_line.total_all_taxes).to eq expense.expense_lines.first.total_all_taxes
|
38
|
+
expect(expense_line.vat).to be_present
|
39
|
+
expect(expense_line.vat).to eq expense.expense_lines.first.vat
|
40
|
+
expect(expense_line.company_part).to be_present
|
41
|
+
expect(expense_line.company_part).to eq expense.expense_lines.first.company_part
|
44
42
|
end
|
45
43
|
|
46
44
|
it "should not be persisted" do
|
@@ -82,6 +80,4 @@ RSpec.describe ::Dorsale::ExpenseGun::Expense::Copy do
|
|
82
80
|
expect(expense.expense_lines.first.updated_at).to be_present
|
83
81
|
expect(copy.expense_lines.first.updated_at).to be_nil
|
84
82
|
end
|
85
|
-
|
86
83
|
end
|
87
|
-
|
@@ -7,7 +7,7 @@ RSpec.describe Dorsale::Flyboy::Task::Copy do
|
|
7
7
|
|
8
8
|
let(:copy) {
|
9
9
|
copy = Dorsale::Flyboy::Task::Copy.(task)
|
10
|
-
copy.save
|
10
|
+
copy.save!
|
11
11
|
copy
|
12
12
|
}
|
13
13
|
|
@@ -21,5 +21,4 @@ RSpec.describe Dorsale::Flyboy::Task::Copy do
|
|
21
21
|
it "is expected to set the progress to 0" do
|
22
22
|
expect(copy.progress).to eq 0
|
23
23
|
end
|
24
|
-
|
25
24
|
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
require
|
1
|
+
require "rails_helper"
|
2
2
|
|
3
3
|
describe Dorsale::Flyboy::Task::Snoozer do
|
4
4
|
describe "#snooze" do
|
@@ -54,7 +54,7 @@ describe Dorsale::Flyboy::Task::Snoozer do
|
|
54
54
|
it "should true if term is today" do
|
55
55
|
task = create(:flyboy_task,
|
56
56
|
:done => false,
|
57
|
-
:term => Date.
|
57
|
+
:term => Date.current,
|
58
58
|
:reminder_type => nil,
|
59
59
|
)
|
60
60
|
|
@@ -86,7 +86,7 @@ describe Dorsale::Flyboy::Task::Snoozer do
|
|
86
86
|
:done => false,
|
87
87
|
:term => "2017-04-20", # future
|
88
88
|
:reminder_type => "custom",
|
89
|
-
:reminder_date => Date.
|
89
|
+
:reminder_date => Date.current,
|
90
90
|
)
|
91
91
|
|
92
92
|
expect(task.snoozer.snoozable?).to be true
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
require "simplecov"
|
1
2
|
# This file was generated by the `rails generate rspec:install` command. Conventionally, all
|
2
3
|
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
4
|
# The generated `.rspec` file contains `--require spec_helper` which will cause this
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dorsale
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- agilidée
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -530,7 +530,6 @@ files:
|
|
530
530
|
- app/controllers/dorsale/alexandrie/attachments_controller.rb
|
531
531
|
- app/controllers/dorsale/application_controller.rb
|
532
532
|
- app/controllers/dorsale/billing_machine/application_controller.rb
|
533
|
-
- app/controllers/dorsale/billing_machine/id_cards_controller.rb
|
534
533
|
- app/controllers/dorsale/billing_machine/invoices_controller.rb
|
535
534
|
- app/controllers/dorsale/billing_machine/payment_terms_controller.rb
|
536
535
|
- app/controllers/dorsale/billing_machine/quotations_controller.rb
|
@@ -579,7 +578,6 @@ files:
|
|
579
578
|
- app/models/dorsale/alexandrie/attachment_type.rb
|
580
579
|
- app/models/dorsale/application_record.rb
|
581
580
|
- app/models/dorsale/billing_machine.rb
|
582
|
-
- app/models/dorsale/billing_machine/id_card.rb
|
583
581
|
- app/models/dorsale/billing_machine/invoice.rb
|
584
582
|
- app/models/dorsale/billing_machine/invoice_line.rb
|
585
583
|
- app/models/dorsale/billing_machine/payment_term.rb
|
@@ -608,15 +606,16 @@ files:
|
|
608
606
|
- app/models/dorsale/users/avatar.rb
|
609
607
|
- app/models/dorsale/users/password_generation.rb
|
610
608
|
- app/pdfs/concerns/dorsale/alexandrie/prawn/render_with_attachments.rb
|
609
|
+
- app/pdfs/dorsale/application_pdf.rb
|
611
610
|
- app/pdfs/dorsale/billing_machine/invoice_multiple_vat_pdf.rb
|
612
611
|
- app/pdfs/dorsale/billing_machine/invoice_single_vat_pdf.rb
|
613
612
|
- app/pdfs/dorsale/billing_machine/quotation_multiple_vat_pdf.rb
|
614
613
|
- app/pdfs/dorsale/billing_machine/quotation_pdf_common_methods.rb
|
615
614
|
- app/pdfs/dorsale/billing_machine/quotation_single_vat_pdf.rb
|
615
|
+
- app/pdfs/dorsale/prawn_helpers.rb
|
616
616
|
- app/policies/dorsale/alexandrie/attachment_policy_helper.rb
|
617
617
|
- app/policies/dorsale/alexandrie/attachment_type_policy_helper.rb
|
618
618
|
- app/policies/dorsale/application_policy.rb
|
619
|
-
- app/policies/dorsale/billing_machine/id_card_policy_helper.rb
|
620
619
|
- app/policies/dorsale/billing_machine/invoice_policy_helper.rb
|
621
620
|
- app/policies/dorsale/billing_machine/payment_term_policy_helper.rb
|
622
621
|
- app/policies/dorsale/billing_machine/quotation_policy_helper.rb
|
@@ -659,12 +658,6 @@ files:
|
|
659
658
|
- app/views/dorsale/alexandrie/attachments/_new_disabled.html.slim
|
660
659
|
- app/views/dorsale/alexandrie/attachments/_progress_bar.html.slim
|
661
660
|
- app/views/dorsale/alexandrie/attachments/index.html.slim
|
662
|
-
- app/views/dorsale/billing_machine/id_cards/_form.html.slim
|
663
|
-
- app/views/dorsale/billing_machine/id_cards/_index_actions.html.slim
|
664
|
-
- app/views/dorsale/billing_machine/id_cards/_list.html.slim
|
665
|
-
- app/views/dorsale/billing_machine/id_cards/edit.html.slim
|
666
|
-
- app/views/dorsale/billing_machine/id_cards/index.html.slim
|
667
|
-
- app/views/dorsale/billing_machine/id_cards/new.html.slim
|
668
661
|
- app/views/dorsale/billing_machine/invoices/_details.html.slim
|
669
662
|
- app/views/dorsale/billing_machine/invoices/_filters.html.slim
|
670
663
|
- app/views/dorsale/billing_machine/invoices/_form.html.slim
|
@@ -847,6 +840,7 @@ files:
|
|
847
840
|
- db/migrate/20160910164840_create_dorsale_customer_vault_people.rb
|
848
841
|
- db/migrate/20160930073538_create_dorsale_alexandrie_attachment_types.rb
|
849
842
|
- db/migrate/20161118071317_dorsale_add_missing_indexes.rb
|
843
|
+
- db/migrate/20161119064536_delete_id_cards.rb
|
850
844
|
- db/migrate/20170127131537_delete_folders.rb
|
851
845
|
- db/migrate/20170127151610_fix_expense_state.rb
|
852
846
|
- db/migrate/20170127155636_billing_machine_add_pdf_file.rb
|
@@ -863,7 +857,6 @@ files:
|
|
863
857
|
- db/migrate/20171023133219_customer_vault_events_add_contact_type.rb
|
864
858
|
- db/migrate/20171024075514_customer_vault_contact_type_default_value.rb
|
865
859
|
- features/access.feature
|
866
|
-
- features/billing_machine_id_cards.feature
|
867
860
|
- features/billing_machine_invoices.feature
|
868
861
|
- features/billing_machine_multiple_vat.feature
|
869
862
|
- features/billing_machine_payment_terms.feature
|
@@ -885,7 +878,6 @@ files:
|
|
885
878
|
- features/flyboy_tasks_summary.feature
|
886
879
|
- features/step_definitions/access_steps.rb
|
887
880
|
- features/step_definitions/alexandrie_steps.rb
|
888
|
-
- features/step_definitions/billing_machine_id_cards_steps.rb
|
889
881
|
- features/step_definitions/billing_machine_invoices_steps.rb
|
890
882
|
- features/step_definitions/billing_machine_multiple_vat.rb
|
891
883
|
- features/step_definitions/billing_machine_payment_terms_steps.rb
|
@@ -907,19 +899,7 @@ files:
|
|
907
899
|
- features/step_definitions/flyboy_tasks_steps.rb
|
908
900
|
- features/step_definitions/tasks_summary_steps.rb
|
909
901
|
- features/step_definitions/users_management_step.rb
|
910
|
-
- features/support/ajax.rb
|
911
|
-
- features/support/database_cleaner.rb
|
912
902
|
- features/support/env.rb
|
913
|
-
- features/support/factory_girl.rb
|
914
|
-
- features/support/fix_referrer.rb
|
915
|
-
- features/support/message_delivery.rb
|
916
|
-
- features/support/poltergeist.rb
|
917
|
-
- features/support/rails.rb
|
918
|
-
- features/support/rspec.rb
|
919
|
-
- features/support/screenshots.rb
|
920
|
-
- features/support/sign_in.rb
|
921
|
-
- features/support/simplecov.rb
|
922
|
-
- features/support/turbolinks.rb
|
923
903
|
- features/users_management.feature
|
924
904
|
- lib/dorsale.rb
|
925
905
|
- lib/dorsale/engine.rb
|
@@ -939,7 +919,6 @@ files:
|
|
939
919
|
- spec/controllers/dorsale/flyboy/tasks_controller_spec.rb
|
940
920
|
- spec/factories/alexandrie_attachment_types.rb
|
941
921
|
- spec/factories/alexandrie_attachments.rb
|
942
|
-
- spec/factories/billing_machine_id_cards.rb
|
943
922
|
- spec/factories/billing_machine_invoice_lines.rb
|
944
923
|
- spec/factories/billing_machine_invoices.rb
|
945
924
|
- spec/factories/billing_machine_payment_terms.rb
|
@@ -964,7 +943,6 @@ files:
|
|
964
943
|
- spec/models/dorsale/address_spec.rb
|
965
944
|
- spec/models/dorsale/alexandrie/attachment_spec.rb
|
966
945
|
- spec/models/dorsale/alexandrie/attachment_type_spec.rb
|
967
|
-
- spec/models/dorsale/billing_machine/id_card_spec.rb
|
968
946
|
- spec/models/dorsale/billing_machine/invoice_line_spec.rb
|
969
947
|
- spec/models/dorsale/billing_machine/invoice_spec.rb
|
970
948
|
- spec/models/dorsale/billing_machine/quotation_line_spec.rb
|
@@ -1046,7 +1024,6 @@ test_files:
|
|
1046
1024
|
- spec/controllers/dorsale/flyboy/tasks_controller_spec.rb
|
1047
1025
|
- spec/factories/alexandrie_attachment_types.rb
|
1048
1026
|
- spec/factories/alexandrie_attachments.rb
|
1049
|
-
- spec/factories/billing_machine_id_cards.rb
|
1050
1027
|
- spec/factories/billing_machine_invoice_lines.rb
|
1051
1028
|
- spec/factories/billing_machine_invoices.rb
|
1052
1029
|
- spec/factories/billing_machine_payment_terms.rb
|
@@ -1071,7 +1048,6 @@ test_files:
|
|
1071
1048
|
- spec/models/dorsale/address_spec.rb
|
1072
1049
|
- spec/models/dorsale/alexandrie/attachment_spec.rb
|
1073
1050
|
- spec/models/dorsale/alexandrie/attachment_type_spec.rb
|
1074
|
-
- spec/models/dorsale/billing_machine/id_card_spec.rb
|
1075
1051
|
- spec/models/dorsale/billing_machine/invoice_line_spec.rb
|
1076
1052
|
- spec/models/dorsale/billing_machine/invoice_spec.rb
|
1077
1053
|
- spec/models/dorsale/billing_machine/quotation_line_spec.rb
|
@@ -1119,7 +1095,6 @@ test_files:
|
|
1119
1095
|
- spec/support/devise.rb
|
1120
1096
|
- spec/support/message_delivery.rb
|
1121
1097
|
- features/access.feature
|
1122
|
-
- features/billing_machine_id_cards.feature
|
1123
1098
|
- features/billing_machine_invoices.feature
|
1124
1099
|
- features/billing_machine_multiple_vat.feature
|
1125
1100
|
- features/billing_machine_payment_terms.feature
|
@@ -1141,7 +1116,6 @@ test_files:
|
|
1141
1116
|
- features/flyboy_tasks_summary.feature
|
1142
1117
|
- features/step_definitions/access_steps.rb
|
1143
1118
|
- features/step_definitions/alexandrie_steps.rb
|
1144
|
-
- features/step_definitions/billing_machine_id_cards_steps.rb
|
1145
1119
|
- features/step_definitions/billing_machine_invoices_steps.rb
|
1146
1120
|
- features/step_definitions/billing_machine_multiple_vat.rb
|
1147
1121
|
- features/step_definitions/billing_machine_payment_terms_steps.rb
|
@@ -1163,17 +1137,5 @@ test_files:
|
|
1163
1137
|
- features/step_definitions/flyboy_tasks_steps.rb
|
1164
1138
|
- features/step_definitions/tasks_summary_steps.rb
|
1165
1139
|
- features/step_definitions/users_management_step.rb
|
1166
|
-
- features/support/ajax.rb
|
1167
|
-
- features/support/database_cleaner.rb
|
1168
1140
|
- features/support/env.rb
|
1169
|
-
- features/support/factory_girl.rb
|
1170
|
-
- features/support/fix_referrer.rb
|
1171
|
-
- features/support/message_delivery.rb
|
1172
|
-
- features/support/poltergeist.rb
|
1173
|
-
- features/support/rails.rb
|
1174
|
-
- features/support/rspec.rb
|
1175
|
-
- features/support/screenshots.rb
|
1176
|
-
- features/support/sign_in.rb
|
1177
|
-
- features/support/simplecov.rb
|
1178
|
-
- features/support/turbolinks.rb
|
1179
1141
|
- features/users_management.feature
|