InstagramPharo/Instagram-Tests/InstagramUrlTest.class.st

28 lines
691 B
Smalltalk

Class {
#name : 'InstagramUrlTest',
#superclass : 'TestCase',
#category : 'Instagram-Tests',
#package : 'Instagram-Tests'
}
{ #category : 'tests' }
InstagramUrlTest >> testInstagramUrlInstanceCreation [
| i |
i := InstagramUrl newURL: 'instagram.com'.
self assert: i url asStringOrText equals: 'https://instagram.com/'
]
{ #category : 'tests' }
InstagramUrlTest >> testNotInstagramUrl1 [
| i |
i := InstagramUrl newURL: 'nstgrm.com'.
self assert: i url asStringOrText equals: 'https://www.instagram.com/'
]
{ #category : 'tests' }
InstagramUrlTest >> testNotInstagramUrl2 [
| i |
i := InstagramUrl newURL: 'nstgrm.com'.
self assert: i class equals: InstagramUrl new class.
]