Skip to content

Commit

Permalink
Alter contribution configuration
Browse files Browse the repository at this point in the history
This is requested by policy to better suit the market.
  • Loading branch information
benlovell committed Apr 29, 2024
1 parent 30b2c2e commit 4e474f6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 16 deletions.
6 changes: 3 additions & 3 deletions config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ salary_thresholds:
contribution_percentages:
current:
employee:
below_threshold: 5
above_threshold: 5
below_threshold: 4
above_threshold: 4
employer:
below_threshold: 0
above_threshold: 3
tax_relief: 20
combined_minimum: 8
combined_minimum: 7

frequency_conversions:
salary_frequencies:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,4 +74,4 @@ Scenario Outline: Adds up to less than 8%
| Minimum | 1.5 | 3.0 |
| Minimum | 3.0 | 3.0 |
| Minimum | 2.5 | 4.0 |
| Minimum | 2.0 | 5.0 |
| Minimum | 1.0 | 5.0 |
4 changes: 2 additions & 2 deletions features/_your_contributions/percent_validation.feature
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ Scenario Outline: minimum contribution percentage on salary less than £6,032

Examples:
| message | employee_default |
| At your salary level there is no legal minimum contribution | 5.0 |
| At your salary level there is no legal minimum contribution | 4.0 |

@welsh
Examples:
| message | employee_default |
| Ar eich lefel cyflog, nid oes isafswm cyfreithiol | 5.0 |
| Ar eich lefel cyflog, nid oes isafswm cyfreithiol | 4.0 |
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Feature:
When I move on to the results page
Then I should see the values on the results page as:
| | Now |
| Employee Contributions | £57.33 |
| Including tax relief of | £11.47 |
| Employee Contributions | £45.87 |
| Including tax relief of | £9.17 |
| Employer Contributions | £57.33 |
| TOTAL Contributions | £114.66 |
| TOTAL Contributions | £103.20 |
4 changes: 2 additions & 2 deletions spec/models/full_contribution_calculator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@
let(:salary_per_year) { 5_000 }

it 'returns 5' do
expect(subject.employee_percent).to eq(5)
expect(subject.employee_percent).to eq(4)
end
end

context 'yearly salary greater than or equal to Lower Earnings Threshold' do
let(:salary_per_year) { 6_032 }

it 'returns 5' do
expect(subject.employee_percent).to eq(5)
expect(subject.employee_percent).to eq(4)
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/models/minimum_contribution_calculator_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

describe '#employee_percent' do
it 'returns 5' do
expect(subject.employee_percent).to eq(5)
expect(subject.employee_percent).to eq(4)
end
end

Expand Down
8 changes: 4 additions & 4 deletions spec/models/your_contributions_form_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@

describe 'minimum combined contributions validation' do
context 'successful' do
it 'passes when the sum of employee and employer percents is GTE to 8' do
it 'passes when the sum of employee and employer percents is GTE to 7' do
subject.employee_percent = 2.0
subject.employer_percent = 6.0
subject.employer_percent = 5.0

expect(subject.valid?).to be_truthy
end
end

context 'failure' do
it 'fails when the sum of employee and employer percents is below 8' do
it 'fails when the sum of employee and employer percents is below 7' do
subject.employee_percent = 1.0
subject.employer_percent = 6.0
subject.employer_percent = 5.0

expect(subject.valid?).to be_falsey
end
Expand Down

0 comments on commit 4e474f6

Please sign in to comment.