|
|
|
|
@ -15,12 +15,8 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is in the Warning zone for the given scale' do
|
|
|
|
|
let(:score) { 1 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_truthy
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "empty-circle"
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle"
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the color class of the zone' do
|
|
|
|
|
@ -31,10 +27,6 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is in the Watch zone for the given scale' do
|
|
|
|
|
let(:score) { 2 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_truthy
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "one-quarter-circle"
|
|
|
|
|
end
|
|
|
|
|
@ -47,10 +39,6 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is in the Growth zone for the given scale' do
|
|
|
|
|
let(:score) { 3 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_truthy
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "half-circle"
|
|
|
|
|
end
|
|
|
|
|
@ -63,10 +51,6 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is in the Approval zone for the given scale' do
|
|
|
|
|
let(:score) { 4 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_truthy
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "three-quarter-circle"
|
|
|
|
|
end
|
|
|
|
|
@ -79,10 +63,6 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is in the Ideal zone for the given scale' do
|
|
|
|
|
let(:score) { 5 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_truthy
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle"
|
|
|
|
|
end
|
|
|
|
|
@ -95,8 +75,8 @@ describe SubcategoryCardPresenter do
|
|
|
|
|
context 'when the given score is invalid for the given scale' do
|
|
|
|
|
let(:score) { 0 }
|
|
|
|
|
|
|
|
|
|
it 'returns a boolean indicating that the icon should be displayed' do
|
|
|
|
|
expect(subcategory_card_presenter.display_icon?).to be_falsey
|
|
|
|
|
it 'returns the icon that represents the zone' do
|
|
|
|
|
expect(subcategory_card_presenter.harvey_ball_icon).to eq "full-circle"
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
|