mirror of
https://gitea.invidious.io/iv-org/shard-athena-negotiation.git
synced 2024-08-15 00:53:23 +00:00
Make use of generics instead of a method (#2)
* Allows Crystal to more accurately know the return type of `ordered_elements` * Add example of `ordered_elements` usage
This commit is contained in:
parent
83eda1298c
commit
96fe9291e3
6 changed files with 28 additions and 32 deletions
|
@ -112,6 +112,8 @@ struct NegotiatorTest < NegotiatorTestCase
|
|||
def test_ordered_elements(header : String, expected : Indexable(String)) : Nil
|
||||
elements = @negotiator.ordered_elements header
|
||||
|
||||
elements.should be_a Array(ANG::Accept)
|
||||
|
||||
expected.each_with_index do |element, idx|
|
||||
elements[idx].should be_a ANG::Accept
|
||||
element.should eq elements[idx].header
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue