@@ -154,12 +154,28 @@ describe('lib/social: urls', function () {
154
154
} ) ;
155
155
156
156
describe ( 'linkedin' , function ( ) {
157
- it ( 'should return a correct concatenated URL' , function ( ) {
158
- social . linkedin ( 'myusername' ) . should . eql ( 'https://www.linkedin.com/in/myusername' ) ;
157
+ it ( 'should return a correct concatenated URL for personal profile' , function ( ) {
158
+ social . linkedin ( 'in/myusername' ) . should . eql ( 'https://www.linkedin.com/in/myusername' ) ;
159
+ } ) ;
160
+
161
+ it ( 'should return a correct concatenated URL for company profile' , function ( ) {
162
+ social . linkedin ( 'company/mycompany' ) . should . eql ( 'https://www.linkedin.com/company/mycompany' ) ;
163
+ } ) ;
164
+
165
+ it ( 'should return a correct concatenated URL for school profile' , function ( ) {
166
+ social . linkedin ( 'school/myschool' ) . should . eql ( 'https://www.linkedin.com/school/myschool' ) ;
159
167
} ) ;
160
168
161
- it ( 'should handle usernames with periods, hyphens, and underscores' , function ( ) {
162
- social . linkedin ( 'john.smith-123' ) . should . eql ( 'https://www.linkedin.com/in/john.smith-123' ) ;
169
+ it ( 'should return a correct concatenated URL for a legacy pub profile' , function ( ) {
170
+ social . linkedin ( 'pub/johnsmith/12/34/567' ) . should . eql ( 'https://www.linkedin.com/pub/johnsmith/12/34/567' ) ;
171
+ } ) ;
172
+
173
+ it ( 'should handle usernames with hyphens' , function ( ) {
174
+ social . linkedin ( 'in/john-smith-123' ) . should . eql ( 'https://www.linkedin.com/in/john-smith-123' ) ;
175
+ } ) ;
176
+
177
+ it ( 'should default to in/ when username does not start with in/, company/, school/, or pub/' , function ( ) {
178
+ social . linkedin ( 'myusername' ) . should . eql ( 'https://www.linkedin.com/in/myusername' ) ;
163
179
} ) ;
164
180
} ) ;
165
181
} ) ;
0 commit comments