features/purchase_committees.feature in purchase-1.0.9 vs features/purchase_committees.feature in purchase-1.0.10

- old
+ new

@@ -4,11 +4,11 @@ Scenario: Cost committee from purchase amount Given a purchase emitter And a characteristic "purchase_amount" of "107.11" When the "cost" committee is calculated Then the committee should have used quorum "from purchase amount" - And the conclusion of the committee should be "100" + And the conclusion of the committee should be "100.00" Scenario: Cost committee from purchase amount and tax Given a purchase emitter And a characteristic "purchase_amount" of "10.00" And a characteristic "tax" of "1.00" @@ -18,18 +18,18 @@ Scenario: Cost committee from default Given a purchase emitter When the "cost" committee is calculated Then the committee should have used quorum "default" - Then the conclusion of the committee should be "100" + Then the conclusion of the committee should be "624.00" Scenario: Adjusted cost committee starting from nothing Given a purchase emitter When the "date" committee is calculated And the "cost" committee is calculated And the "adjusted_cost" committee is calculated - Then the conclusion of the committee should be "82.85004" + Then the conclusion of the committee should be "516.98426" Scenario Outline: Adjusted cost committee from cost and date Given a purchase emitter And a characteristic "cost" of "<cost>" And characteristic "date" of "<date>" @@ -38,16 +38,10 @@ Examples: | cost | date | adjusted_cost | | 831.23 | 2010-08-01 | 688.67439 | | 11.00 | 2005-07-14 | 9.11350 | - Scenario: Merchant category committee from default - Given a purchase emitter - When the "merchant_category" committee is calculated - Then the committee should have used quorum "default" - And the conclusion of the committee should have "mcc" of "5111" - Scenario Outline: Merchant category committee from merchant Given a purchase emitter And a characteristic "merchant.id" of "<id>" When the "merchant_category" committee is calculated Then the committee should have used quorum "from merchant" @@ -66,40 +60,46 @@ | mcc | naics | ratio | | 1111 | 111111 | 1 | | 2222 | 399900 | 0.5 | | 2222 | 459000 | 0.5 | - Scenario Outline: Trade industry ratios from merchant category industries + Scenario: Trade industry ratios from default Given a purchase emitter - And a characteristic "merchant_category.mcc" of "<mcc>" + When the "trade_industry_ratios" committee is calculated + Then the committee should have used quorum "default" + And the conclusion of the committee should include a key of "" and value "" + + Scenario: Trade industry ratios from merchant category industries + Given a purchase emitter + And a characteristic "merchant_category.mcc" of "2222" When the "merchant_category_industries" committee is calculated And the "trade_industry_ratios" committee is calculated Then the committee should have used quorum "from merchant category industries" - And the conclusion of the committee should include a key of "<naics>" and value "<ratio>" - Examples: - | mcc | naics | ratio | - | 2222 | 459000 | 0.5 | + And the conclusion of the committee should include a key of "459000" and value "0.5" - Scenario Outline: Trade industry ratios from industry + Scenario: Trade industry ratios from industry Given a purchase emitter - And a characteristic "industry.naics_code" of "<naics>" + And a characteristic "industry.naics_code" of "459000" When the "trade_industry_ratios" committee is calculated Then the committee should have used quorum "from industry" - And the conclusion of the committee should include a key of "<naics>" and value "1" - Examples: - | naics | - | 459000 | + And the conclusion of the committee should include a key of "459000" and value "1" Scenario: Trade industry ratios from merchant category industries and industry Given a purchase emitter And a characteristic "merchant_category.mcc" of "1111" And a characteristic "industry.naics_code" of "459000" When the "merchant_category_industries" committee is calculated And the "trade_industry_ratios" committee is calculated Then the committee should have used quorum "from industry" And the conclusion of the committee should include a key of "459000" and value "1" + Scenario: Non-trade industry ratios from default + Given a purchase emitter + When the "non_trade_industry_ratios" committee is calculated + Then the committee should have used quorum "default" + And the conclusion of the committee should include a key of "339991" and value "1" + Scenario Outline: Non-trade industry ratios from merchant category industries Given a purchase emitter And a characteristic "merchant_category.mcc" of "<mcc>" When the "merchant_category_industries" committee is calculated And the "non_trade_industry_ratios" committee is calculated @@ -200,10 +200,11 @@ And the "industry_ratios" committee is calculated Then the conclusion of the committee should include a key of "<new_naics>" and value "<ratio>" Examples: | naics | new_naics | ratio | | 111111 | 111111 | 1.0 | + | 339991 | 339991 | 1.0 | | 399100 | 399100 | 1.0 | | 399200 | 399200 | 1.0 | | 459000 | 399100 | 0.75 | | 459000 | 399200 | 0.25 | @@ -256,10 +257,11 @@ And the "industry_sector_ratios" committee is calculated Then the conclusion of the committee should include a key of "<io_code>" and value "<ratio>" Examples: | naics | io_code | ratio | | 111111 | 111000 | 1.0 | + | 339991 | 111000 | 1.0 | | 399100 | 3991A0 | 0.75 | | 399100 | 3991B0 | 0.25 | | 459000 | 3991A0 | 0.5625| | 459000 | 3991B0 | 0.1875| | 459000 | 399200 | 0.25 | @@ -276,10 +278,11 @@ And the "industry_sector_ratios" committee is calculated Then the conclusion of the committee should have ratios summing to "1.0" Examples: | naics | | 111111 | + | 339991 | | 399100 | | 459000 | Scenario Outline: Industry sector shares committee starting from merchant category Given a purchase emitter @@ -317,9 +320,10 @@ And the "industry_sector_shares" committee is calculated Then the conclusion of the committee should include a key of "<io_code>" and value "<share>" Examples: | naics | io_code | share | | 111111 | 111000 | 100.0 | + | 339991 | 111000 | 100.0 | | 399100 | 3991A0 | 75.0 | | 399100 | 3991B0 | 25.0 | | 399200 | 399200 | 100.0 | | 399900 | 399900 | 100.0 | | 459000 | 3991A0 | 56.25 |