Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

RSpec test for Radiustar::Value#id

  • Loading branch information...
commit 39d20451ad6c633efebb14c1543036a7120a7689 1 parent 90b1f60
Guido De Rosa authored
Showing with 11 additions and 0 deletions.
  1. +11 −0 spec/value_spec.rb
View
11 spec/value_spec.rb
@@ -0,0 +1,11 @@
+require File.join(File.dirname(__FILE__), %w[spec_helper])
+
+describe Radiustar::Value do
+ it "should get numeric value of NAS-Port-Type == Ethernet from dictionary.rfc2865" do
+ dict = Radiustar::Dictionary.new
+ dict.read(File.dirname(__FILE__) + '/../templates/dictionary.rfc2865')
+ attribute = dict.find_attribute_by_name 'NAS-Port-Type'
+ ethernet_value = attribute.find_values_by_name 'Ethernet'
+ ethernet_value.id.should == 15
+ end
+end
Please sign in to comment.
Something went wrong with that request. Please try again.